conf x nuget...

This commit is contained in:
Samuele E. Locatelli
2019-10-09 15:18:30 +02:00
parent 7217901e60
commit 408d2aec8f
6 changed files with 107 additions and 4 deletions
+11
View File
@@ -78,7 +78,18 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="mconnect.conf.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="MConnectSDK.nuspec" />
<None Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="README.txt" />
<Content Include="resources\NugetNote.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+6 -4
View File
@@ -29,9 +29,11 @@
<dependency id="System.Threading.Tasks.Extensions" version="4.5.3" />
<dependency id="YamlDotNet" version="7.0.0" />
</dependencies>
<!-- A readme.txt to display when the package is installed -->
<!-- <files>
<file src="readme.txt" target="" />
</files> -->
</metadata>
<!-- A readme.txt to display when the package is installed -->
<files>
<file src="README.txt" target="" />
<file src="mconnect.conf.yaml" />
<file src="NLog.config" />
</files>
</package>
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >
<!-- optional, add some variabeles
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="myvar" value="myvalue"/>
<!--
See https://github.com/nlog/nlog/wiki/Configuration-file
for information on customizing logging rules and outputs.
-->
<targets async="true">
<target xsi:type="File"
name="mconnect_sdk"
fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}"
/>
</targets>
<rules>
<logger name="MConnectSDK.*" minlevel="Debug" writeTo="mconnect_sdk" />
</rules>
</nlog>
+31
View File
@@ -0,0 +1,31 @@
---------------------------------------------------------------
------- MConnect Client SDK -------
---------------------------------------------------------------
Libreria di utility per connessione con il cloud di Maestro COnnect.
Le dipendenze sono necessarie al funzionamento dell'applicazione
Attenzione a configurare correttamente il file NLog.xml includendo il rule per la classe, ad esempio un NLog (unico) presente potrebbe essere
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >
<targets async="true">
<target xsi:type="File"
name="mconnect_sdk"
fileName="${basedir}/logs/${shortdate}.log"
layout="${longdate} ${uppercase:${level}} ${message}"
/>
</targets>
<rules>
<logger name="MConnectSDK.*" minlevel="Debug" writeTo="mconnect_sdk" />
</rules>
</nlog>
+14
View File
@@ -0,0 +1,14 @@
#File di conf per MConnectClientSDK
conf:
Client_ID: "test"
MachineID: "cjpjwuas400cb0slxs5zfj4yh"
PingTarget: "stg.api.maestroconnect.scmgroup.com"
AliveTarget: "https://stg.api.maestroconnect.scmgroup.com/health"
BaseUrl: "https://stg.api.maestroconnect.scmgroup.com/api"
UploadUrl: "https://stg.api.maestroconnect.scmgroup.com/storage-api/backups"
WebAppUrl: "https://stg.maestroconnect.scmgroup.com/settings/machine-activation?user_code={0}&machine_id={1}"
MemoryLayer:
Redis:
ConnectionString: "127.0.0.1,abortConnect=false,ssl=false"
DbIndex: 1
Module: "MCC"
+14
View File
@@ -0,0 +1,14 @@
---------------------------------------------------------------
------- MConnect Client SDK -------
---------------------------------------------------------------
Di seguito esempi comandi x creare pacchetti NuGet (in questo caso in una folder ad hoc)
1) spostarti su folder x output (Rilasci, che è allo stesso livello della folder del proj)
cd Rilasci
2) Comando per la creazione di pacchetti nuget di RELEASE:
nuget pack ..\MConnectSDK\MConnectSDK.csproj -properties Configuration=Release
3) Comando per la creazione di pacchetti nuget di DEBUG:
nuget pack ..\MConnectSDK\MConnectSDK.csproj -properties Configuration=Debug -symbols -SymbolPackageFormat snupkg