I need to generate the following xml output from the following dataset. I have attached the dataset and the xml output sample. I am going to put the C# code in a SSIS script task. Can you guys help me to write to code in C#. I am a database guy but i really don't know how this XML works with dataset. I'd really appricate if you can help. Thanks In advance.
AGENTID STARTDAY STARTMONTH STARTYEAR STARTHOUR STARTMINUTE ENDHOUR ENDMINUTE EXCEPTION
910180 5 5 2011 10 30 11 0 OPEN
910180 5 5 2011 11 0 11 30 OPEN
910180 5 5 2011 11 30 12 0 OPEN
910180 6 5 2011 17 30 18 0 OPEN
910180 7 5 2011 18 0 18 30 OPEN
911568 6 5 2011 16 30 17 0 OPEN
911568 6 5 2011 19 0 19 30 OPEN
911568 6 5 2011 19 30 20 0 OPEN
911568 6 5 2011 20 0 20 30 OPEN
911568 6 5 2011 20 30 21 0 OPEN
911568 6 5 2011 21 0 21 30 OPEN
911568 6 5 2011 22 0 22 30 OPEN
911568 7 5 2011 10 30 11 0 OPEN
911568 7 5 2011 11 0 11 30 OPEN
<?xml version="1.0" encoding="ISO-8859-1" ?>
<agentScheduleList>
<agent>
<id>470185</id>
<schedule>
<day>12</day>
<month>8</month>
<year>2002</year>
<exception>
<startdate>
<day>12</day>
<month>8</month>
<year>2002</year>
</startdate>
<starttime>
<hour>22</hour>
<min>0</min>
</starttime>
<endtime>
<hour>2</hour>
<min>0</min>
</endtime>
<code>Open</code>
</exception>
<exception>
<startdate>
<day>13</day>
<month>8</month>
<year>2002</year>
</startdate>
<starttime>
<hour>2</hour>
<min>0</min>
</starttime>
<endtime>
<hour>3</hour>
<min>0</min>
</endtime>
<code>Lunch</code>
</exception>
<exception>
<startdate>
<day>13</day>
<month>8</month>
<year>2002</year>
</startdate>
<starttime>
<hour>3</hour>
<min>0</min>
</starttime>
<endtime>
<hour>7</hour>
<min>0</min>
</endtime>
<code>Open</code>
</exception>
</schedule>
</agent>
<agent>
<id>470185</id>
<schedule>
<day>13</day>
<month>8</month>
<year>2002</year>
<offexception/>
</schedule>
</agent>
</agentScheduleList>
The DataSet class has a WriteXml function to write your data to a file, or GetXml to return it as a string. The documentation on MSDN has further explanation of customizing the output to get it to match exactly what you need, if your XML structure differs from your database structure.
I think you can just use:
string xml = yourDataSet.GetXml();
You can read it back into a DataSet using the DataSet method ReadXml.
You can also use the following to get an XmlDataDocument:
System.Xml.XmlDataDocument xmlDoc = new System.Xml.XmlDataDocument(yourDataSet);
Related
I have a .net project that runs in windows with VS code with no issues.
I am trying to run the same project in Ubuntu 20.04.2 with VS code. Run trying to run it with F5, I get the errors:
CSC : error CS8032: An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from /home/one/.nuget/packages/system.text.json/6.0.6/analyzers/dotnet/roslyn3.11/cs/System.Text.Json.SourceGeneration.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.11.0.0, Culture=neutral, PublicKeyToken=****'. The system cannot find the file specified.. [/home/one/github/fhir/Foo.Service/Foo.Service/Foo.Service.csproj]
CSC : error CS8032: An instance of analyzer System.Text.Json.SourceGeneration.JsonSourceGenerator cannot be created from /home/one/.nuget/packages/system.text.json/6.0.6/analyzers/dotnet/roslyn4.0/cs/System.Text.Json.SourceGeneration.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.11.0.0, Culture=neutral, PublicKeyToken=******'. The system cannot find the file specified.. [/home/one/github/fhir/Foo.Service/Foo.Service/Foo.Service.csproj]
I verified the files are on my system:
roslyn3.11
% lr /home/one/.nuget/packages/system.text.json/6.0.6/analyzers/dotnet/roslyn3.11/cs/System.Text.Json.SourceGeneration.dll
-rwxrw-r-- 1 one one 148K Aug 19 19:48 /home/one/.nuget/packages/system.text.json/6.0.6/analyzers/dotnet/roslyn3.11/cs/System.Text.Json.SourceGeneration.dll
roslyn4.0
one#work ~
% lr /home/one/.nuget/packages/system.text.json/6.0.6/analyzers/dotnet/roslyn4.0/cs/System.Text.Json.SourceGeneration.dll
-rwxrw-r-- 1 one one 164K Aug 19 19:48 /home/one/.nuget/packages/system.text.json/6.0.6/analyzers/dotnet/roslyn4.0/cs/System.Text.Json.SourceGeneration.dll
csproj
one#work ~
% lr /home/one/github/fhir/Foo.Service/Foo.Service/Foo.Service.csproj
-rw-rw-r-- 1 one one 1.8K Nov 10 16:59 /home/one/github/fhir/Foo.Service/Foo.Service/Foo.Service.csproj
It looks like "Microsoft.CodeAnalysis" was missing. So, I installed it with nuget in VS code. I added 'nuget: add package' in VS code to install 'Microsoft.CodeAnalaysis' version 3.11.0.
I have verified it successfully lives on my system:
one#work ...packages/microsoft.codeanalysis/3.11.0
% pwd
/home/one/.nuget/packages/microsoft.codeanalysis/3.11.0
one#work ...packages/microsoft.codeanalysis/3.11.0
% lr
total 80K
drwxrwxr-x 2 one one 4.0K Nov 14 10:08 .
drwxrwxr-x 4 one one 4.0K Nov 14 10:08 ..
-rw-rw-r-- 1 one one 178 Nov 14 10:08 .nupkg.metadata
-rwxrw-r-- 1 one one 19K Aug 10 2021 .signature.p7s
-rwxrw-r-- 1 one one 6.9K Apr 30 2021 Icon.png
-rwxrw-r-- 1 one one 2.2K Aug 3 2021 ThirdPartyNotices.rtf
-rw-rw-r-- 1 one one 28K Nov 14 10:08 microsoft.codeanalysis.3.11.0.nupkg
-rw-rw-r-- 1 one one 88 Nov 14 10:08 microsoft.codeanalysis.3.11.0.nupkg.sha512
-rwxrw-r-- 1 one one 2.4K Aug 3 2021 microsoft.codeanalysis.nuspec
I still get the errors mentioned above.
I have issue when trying to connect to a progress openedge database using odbc. The client code is in c# and running in docker. Here is my code :
using (OdbcConnection cn = new OdbcConnection("DSN=PROGRESS;UID=username;PWD=pass;"))
{
cn.Open();
}
The issue is that program is crashing at the cn.Open() with the following error : ERROR [60] [DataDirect][ODBC 20101 driver]6013.
I can successfully connect using isql -v PROGRESS username pass and I can query tables.
Environnement :
It is a .NET Core app on a docker environment. Here is my odbc.ini file :
[PROGRESS]
Driver=/usr/lib/x86_64-linux-gnu/pgoe27.so
HostName=192.168.2.11
DatabaseName=dbname
LogonID=username
Password=pass
PortNumber=20000
[ODBC]
Trace=0
TraceFile=odbctrace.out
TraceDll=/usr/lib/openedge/lib/pgtrc27.so
InstallDir=/usr/lib/openedge
I do not understand why I can connect using isql but not using c# OdbcConnection...
Thanks in advance
EDITED
Here is my odbc folder permissions :
# ls -l lib
total 27124
-rwxr-xr-x 1 root root 1782648 Aug 2 13:09 libodbc.so
-rwxr-xr-x 1 root root 1280424 Aug 2 13:09 libodbcinst.so
-rwxr-xr-x 1 root root 14682952 Aug 2 13:09 libpgicu27.so
-rwxr-xr-x 1 root root 1468736 Aug 2 13:09 libpgmback.so
-rwxr-xr-x 1 root root 2351288 Aug 2 13:09 libpgssl27.so
-rwxr-xr-x 1 root root 1586488 Aug 2 13:09 odbccurs.so
-rwxr-xr-x 1 root root 2871272 Aug 2 13:09 pgoe27.so
-rwxr-xr-x 1 root root 1667632 Aug 2 13:09 pgtrc27.so
-rwxr-xr-x 1 root root 63800 Aug 2 13:09 vscnctdlg.so
# ls -lR locale
locale:
total 8
drwxrwxrwx 1 root root 4096 Aug 2 13:09 en_US
locale/en_US:
total 4
drwxrwxrwx 1 root root 4096 Aug 2 13:09 LC_MESSAGES
locale/en_US/LC_MESSAGES:
total 208
-rw-rw-r-- 1 root root 36241 Aug 2 13:09 odbc.m
-rw-rw-r-- 1 root root 19099 Aug 2 13:09 odbc.po
-rw-rw-r-- 1 root root 19096 Aug 2 13:09 pgmback.mo
-rw-rw-r-- 1 root root 11581 Aug 2 13:09 pgmback.po
-rw-rw-r-- 1 root root 72722 Aug 2 13:09 pgoe27.mo
-rw-rw-r-- 1 root root 47627 Aug 2 13:09 pgoe27.po
I have managed connecting specifying connection in my .net program, but I still cannot using DSN + odbc.ini :
OdbcConnectionStringBuilder builder = new OdbcConnectionStringBuilder
{
Driver = "/usr/lib/openedge/lib/pgoe27.so",
};
builder.Add("HostName", "192.168.2.11");
builder.Add("DatabaseName", "PROGRESS");
builder.Add("LogonID", "username");
builder.Add("Password", "password");
builder.Add("PortNumber", "20000");
using (OdbcConnection cnGlims = new OdbcConnection(builder.ConnectionString))
{
cnGlims.Open();
}
According to the Progress Knowledgebase the fact that you are getting error numbers (60, 6013) rather than an error message indicates a configuration problem preventing the message description files from being loaded.
https://knowledgebase.progress.com/articles/Knowledge/3556 says:
Cause: The ODBC driver manager and/or the ODBC driver library cannot
load its message files.
InstallDir is not set correctly in the [ODBC] section of the odbc.ini
file or the message files in locale/en_US/LC_MESSAGES are missing.
Make sure the following are set correctly:
Set the environment variable LANG to en_US :
export LANG=en_US (ksh shell)
setenv LANG en_US (csh shell)
Ensure that the environment variable ODBCINI (or ODBC_INI) is pointing
to the proper odbc.ini file
Ensure that in the [ODBC] section of your odbc.ini file the correct
installation path of the ODBC drivers is specified for InstallDir
e.g. InstallDir=/opt/odbc
Make sure the .mo / .po messages files exist
(odbcinstaldir/locale/en_US/LC_MESSAGES) and can be loaded by your
application
If your installDir is /usr/lib/openedge then you should test for the existence (and permissions) of these files like so:
$ cd /usr/lib/openedge
$ ls -l ./odbc/lib
total 29832
-rwxrwxr-x. 1 root root 1676480 Jan 21 2020 libodbcinst.so
-rwxrwxr-x. 1 root root 2182544 Jan 21 2020 libodbc.so
-rwxrwxr-x. 1 root root 14682952 Jan 21 2020 libpgicu27.so
-rwxrwxr-x. 1 root root 1977640 Jan 21 2020 libpgmback.so
-rwxrwxr-x. 1 root root 2359016 Jan 21 2020 libpgssl27.so
-rwxrwxr-x. 1 root root 2065616 Jan 21 2020 odbccurs.so
-rwxrwxr-x. 1 root root 3383128 Jan 21 2020 pgoe27.so
-rwxrwxr-x. 1 root root 2142864 Jan 21 2020 pgtrc27.so
-rwxrwxr-x. 1 root root 63800 Jan 21 2020 vscnctdlg.so
$ ls -lR ./odbc/locale
./odbc/locale:
total 0
drwxrwxrwx. 3 root root 25 Apr 10 2020 en_US
./odbc/locale/en_US:
total 0
drwxrwxrwx. 2 root root 105 Apr 10 2020 LC_MESSAGES
./odbc/locale/en_US/LC_MESSAGES:
total 212
-rw-rw-r--. 1 root root 36241 Jan 21 2020 odbc.m
-rw-rw-r--. 1 root root 19099 Jul 29 2011 odbc.po
-rw-rw-r--. 1 root root 19096 Jan 21 2020 pgmback.mo
-rw-rw-r--. 1 root root 11581 Jul 29 2011 pgmback.po
-rw-rw-r--. 1 root root 74007 Jan 21 2020 pgoe27.mo
-rw-rw-r--. 1 root root 49045 Jan 21 2020 pgoe27.po
Context
For learning purposes, I am trying to develop using a text editor and MSBuild from the command line. My goal is to be able to build as quickly as possible using MSBuild.exe through cli, by skipping already built dependencies.
As described in this link:
There are some significant differences between when projects build in Visual Studio vs. when you invoke MSBuild directly. [...] In MSBuild, when referenced projects are required, a build actually occurs; that is, it runs tasks and tools, and generates the output. [...] When a Visual Studio build finds a referenced project, MSBuild only returns the expected outputs from the referenced project; it lets Visual Studio control the building of those other projects.
Problem Statement
Can I configure my csproj files so that, just like in Visual Studio...
Given a csproj project called A
And there are changes in A since last build
And A has a dependency on a project B that is up to date (already built, no changes since last build)
And A has a dependency on a project C that is not up to date (already built, but there are changes since last build)
When I run MSBuild on project A
Then B is not re-compiled
And C is re-compiled
And A is re-compiled
?
What I tried
I read about incremental build.
I tried to append the following Targets at the bottom of the <Project> node in my csproj files:
<Target Name="Build" Inputs="#(CSFile);#(Content)" Outputs="$(TargetFileName)">
<Csc Sources="#(CSFile)" OutputAssembly="$(TargetFileName)"/>
</Target>
This is the configuration depicted in "How to: Build incrementally" by Microsoft
I got MSBuild errors saying the source files were not found
<Target Name="Build" Inputs="#(Compile);#(Content)" Outputs="$(TargetFileName)">
<Csc Sources="#(Compile)" OutputAssembly="$(TargetFileName)"/>
</Target>
The same configuration, using Compile item list instead of CSFile item list
I got better results. But...
I got errors saying dependencies were not found
<Target Name="Build"
Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="#(TargetPathWithTargetPlatformMoniker)"
Inputs="#(Compile);#(Content)" Outputs="$(TargetFileName)">
<Csc Sources="#(Compile)" OutputAssembly="$(TargetFileName)"/>
</Target>
The same configuration, but expanding from MSBuild's default Build definition
I get plenty of CS0103 and CS0234 errors:
CS0103: The name 'foobar' does not exist in the current context
CS0234: The type or namespace name 'foo' does not exist in the namespace 'bar' (are you missing an assembly reference?)
<Target Name="Build"
Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="#(TargetPathWithTargetPlatformMoniker)"
Inputs="#(Compile);#(Content)" Outputs="$(TargetDir)$(TargetFileName)">
<Csc Sources="#(Compile)" OutputAssembly="$(TargetFileName)"/>
</Target>
The same configuration, using $(TargetDir)$(TargetFileName) Output instead of $(TargetFileName)
I don't have errors anymore
But building a second time, with no change whatsoever, still takes time (14 seconds using minimal verbosity on a single csproj inside a 120-projects solution with its dependencies already built from the first build)
58 occurrences of Skipping target "Build" because all output files are up-to-date with respect to the input files.
79 occurrences of Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
Here is an extract of the performance report from diagnostic verbosity :
============================== Build Hierarchy (IDs represent configurations) =====================================================
Id : Exclusive Time Total Time Path (Targets)
----------------------------------------------------------------------------------------------------------------------------------- (TaskId:0)
0 : 19.251s 572.393s some_path () (TaskId:0)
| 55 : 0.000s 0.000s some_path () (TaskId:0)
| 21 : 0.245s 0.963s some_path (GetTargetFrameworks) (TaskId:0)
...
| 43 : 1.465s 10.801s some_path () (TaskId:0)
| 44 : 3.959s 48.216s some_path () (TaskId:0)
| | 55 : 2.260s 5.435s some_path () (TaskId:0)
| 52 : 6.762s 7.694s some_path () (TaskId:0)
| . 112 : 1.089s 1.089s some_path (GetNativeManifest) (TaskId:0)
| 64 : 5.494s 25.018s some_path () (TaskId:0)
| | 139 : 0.212s 0.807s some_path (GetTargetFrameworks) (TaskId:0)
| | . 157 : 0.595s 0.595s some_path (GetTargetFrameworksWithPlatformForSingleTargetFramework) (TaskId:0)
Project Evaluation Performance Summary:
42 ms some_path 1 calls
...
159 ms some_path 1 calls
175 ms some_path 1 calls
213 ms some_path 1 calls
261 ms some_path 2 calls
Project Performance Summary:
2079 ms some_path 18 calls
615 ms GetNativeManifest 6 calls
17 ms GetCopyToOutputDirectoryItems 6 calls
2094 ms some_path 40 calls
247 ms GetTargetFrameworks 10 calls
437 ms GetNativeManifest 10 calls
1 ms GetCopyToOutputDirectoryItems 10 calls
2352 ms some_path 8 calls
260 ms GetTargetFrameworks 2 calls
840 ms GetNativeManifest 2 calls
0 ms GetCopyToOutputDirectoryItems 2 calls
2374 ms some_path 68 calls
292 ms GetTargetFrameworks 17 calls
855 ms GetNativeManifest 17 calls
15 ms GetCopyToOutputDirectoryItems 17 calls
2378 ms some_path 24 calls
266 ms GetTargetFrameworks 6 calls
895 ms GetNativeManifest 6 calls
14 ms GetCopyToOutputDirectoryItems 6 calls
2413 ms some_path 12 calls
241 ms GetTargetFrameworks 3 calls
932 ms GetNativeManifest 3 calls
13 ms GetCopyToOutputDirectoryItems 3 calls
...
34668 ms some_path 8 calls
281 ms GetTargetFrameworks 2 calls
4564 ms GetNativeManifest 2 calls
1 ms GetCopyToOutputDirectoryItems 2 calls
44339 ms some_path 20 calls
252 ms GetTargetFrameworks 5 calls
8828 ms GetNativeManifest 5 calls
0 ms GetCopyToOutputDirectoryItems 5 calls
46147 ms some_path 4 calls
474 ms GetTargetFrameworks 1 calls
4288 ms GetNativeManifest 1 calls
0 ms GetCopyToOutputDirectoryItems 1 calls
52157 ms some_path 16 calls
239 ms GetTargetFrameworks 4 calls
3703 ms GetNativeManifest 4 calls
0 ms GetCopyToOutputDirectoryItems 4 calls
352737 ms some_path 4 calls
419 ms GetTargetFrameworks 1 calls
19594 ms GetNativeManifest 1 calls
0 ms GetCopyToOutputDirectoryItems 1 calls
572226 ms some_path 1 calls
Target Performance Summary:
0 ms BuildGenerateSources 1 calls
0 ms SelectResourceCompile 1 calls
0 ms AfterResourceCompile 1 calls
0 ms _ResourceCompile 1 calls
0 ms AfterBuildCompileEvent 1 calls
0 ms _BuildCompileAction 1 calls
0 ms BuildCompile 1 calls
0 ms BuildLinkTraverse 1 calls
0 ms ComputeLegacyManifestEmbedding 1 calls
0 ms BeforeLink 1 calls
0 ms BeforeResourceCompile 1 calls
0 ms CreateSatelliteAssemblies 80 calls
0 ms ComputeRCGeneratedLinkInputs 1 calls
0 ms _AfterCompileWinFXInternal 59 calls
0 ms AfterCompileWinFX 59 calls
0 ms ComputeCustomBuildOutput 1 calls
0 ms ComputeLinkInputsFromProject 1 calls
0 ms PreLinkEvent 1 calls
0 ms _Xsd 1 calls
0 ms _Link 1 calls
0 ms BeforeCompile 79 calls
0 ms ComputeRCOutputs 1 calls
0 ms _ALink 1 calls
0 ms _ClCompile 1 calls
0 ms _SGenCheckForOutputs 1 calls
0 ms ComputeMIDLGeneratedCompileInputs 1 calls
0 ms _SelectedFiles 1 calls
0 ms PreBuildEvent 1 calls
0 ms BeforeBuildGenerateSources 1 calls
0 ms BuildGenerateSourcesTraverse 1 calls
0 ms AfterMidl 1 calls
0 ms SetCABuildNativeEnvironmentVariables 1 calls
0 ms _Midl 1 calls
0 ms AfterBuildGenerateSources 1 calls
0 ms AfterClCompile 1 calls
0 ms AfterBuildGenerateSourcesEvent 1 calls
0 ms _BuildGenerateSourcesAction 1 calls
0 ms BuildCompileTraverse 1 calls
0 ms BeforeClCompile 1 calls
0 ms ComputeCLInputPDBName 1 calls
0 ms AfterBuild 80 calls
0 ms ComputeReferenceCLInput 1 calls
0 ms FixupCLCompileOptions 1 calls
0 ms SelectCustomBuild 1 calls
0 ms SelectClCompile 1 calls
0 ms _PrepareForReferenceResolution 1 calls
0 ms _Manifest 1 calls
0 ms AfterLink 1 calls
0 ms ResolveLockFileAnalyzers 20 calls
0 ms GenerateAssemblyInfo 20 calls
0 ms _Appverifier 1 calls
0 ms _Deploy 1 calls
0 ms _BuildLinkAction 1 calls
0 ms AfterMarkupCompilePass1 59 calls
0 ms BuildLink 1 calls
0 ms MakeDirsForBscMake 1 calls
0 ms _gRPC_PrepareCompileOptions 4 calls
0 ms AfterResolveReferences 80 calls
0 ms Protobuf_BeforeCompile 4 calls
0 ms AddImplicitDefineConstants 20 calls
0 ms GenerateFakes 20 calls
0 ms InitializeSourceControlInformation 20 calls
0 ms AddSourceRevisionToInformationalVersion 20 calls
0 ms _DefaultMicrosoftNETPlatformLibrary 20 calls
0 ms ComputeCLCompileGeneratedSbrFiles 1 calls
0 ms _BscMake 1 calls
0 ms PrepareProjectReferences 80 calls
0 ms ComputeCLCompileGeneratedXDCFiles 1 calls
0 ms PrepareResources 79 calls
0 ms ResGen 79 calls
0 ms BeforeBuild 79 calls
0 ms CreateCustomManifestResourceNames 80 calls
0 ms _RemoveZipFileSuggestedRedirect 2 calls
0 ms SetWin32ManifestProperties 79 calls
0 ms ResolvedXDCMake 1 calls
0 ms MakeDirsForXdcMake 1 calls
0 ms Protobuf_Compile 4 calls
0 ms _XdcMake 1 calls
0 ms Protobuf_AfterCompile 4 calls
0 ms BeforeResolveReferences 80 calls
0 ms _Protobuf_Compile_BeforeCsCompile 4 calls
1 ms CoreBuild 79 calls
1 ms Protobuf_PrepareCompileOptions 4 calls
1 ms _Protobuf_GatherStaleSimple 4 calls
1 ms GenerateMSBuildEditorConfigFile 79 calls
1 ms ResolvePackageDependenciesForBuild 20 calls
1 ms PrepareResourceNames 80 calls
1 ms GenerateMSBuildEditorConfigFileShouldRun 79 calls
1 ms ComputeManifestGeneratedLinkerInputs 1 calls
1 ms BeforeResGen 79 calls
1 ms AfterCompile 79 calls
1 ms MakeDirsForMidl 1 calls
1 ms ComputeManifestInputsTargets 1 calls
1 ms DoLinkOutputFilesMatch 1 calls
1 ms gRPC_ResolvePluginFullPath 4 calls
1 ms CollectPackageReferences 20 calls
1 ms _CheckWindowsSDKInstalled 1 calls
1 ms AddAssemblyAliasToBclAsync 1 calls
1 ms AfterResGen 79 calls
1 ms _Protobuf_EnforceInvariants 4 calls
1 ms PrepareForRun 80 calls
2 ms _Protobuf_CoreCompile 4 calls
2 ms Compile 79 calls
2 ms FinalizeBuildStatus 1 calls
2 ms BeforeGenerateFakesAssemblies 20 calls
2 ms GenerateBindingRedirects 1 calls
3 ms ResolveReferences 80 calls
3 ms GetTargetPath 79 calls
3 ms MainResourcesGeneration 1 calls
3 ms _CopySourceItemsToOutputDirectory 80 calls
3 ms ComputeIntermediateSatelliteAssemblies 5 calls
3 ms CopyAdditionalFiles 79 calls
4 ms WarnCompileDuplicatedFilename 1 calls
5 ms CopyFileToFolders 1 calls
6 ms SetTelemetryEnvironmentVariables 1 calls
7 ms _PrepareForBuild 1 calls
9 ms MakeDirsForCl 1 calls
10 ms ResourceCompile 1 calls
12 ms GetResolvedWinMD 1 calls
12 ms _ComputePackageReferencePublish 20 calls
12 ms ComputeLinkSwitches 1 calls
12 ms _Protobuf_SanityCheck 4 calls
13 ms _CheckForObsoleteDotNetCliToolReferences 20 calls
13 ms MakeDirsForResourceCompile 1 calls
13 ms Protobuf_ReconcileOutputs 4 calls
14 ms MakeDirsForLink 1 calls
15 ms PlatformPrepareForBuild 1 calls
16 ms InitializeBuildStatus 1 calls
18 ms Protobuf_ResolvePlatform 4 calls
20 ms EnsureNuGetPackageBuildImports 3 calls
22 ms _Protobuf_GatherStaleFiles 4 calls
23 ms _ComputeTargetFrameworkItems 10 calls
27 ms GetNativeManifest 79 calls
28 ms IncludeTransitiveProjectReferences 20 calls
28 ms _Protobuf_AugmentLanguageCompile 4 calls
30 ms ComputeCLOutputs 1 calls
31 ms _CheckForUnsupportedNETStandardVersion 20 calls
31 ms _Protobuf_SelectFiles 4 calls
32 ms EnableIntermediateOutputPathMismatchWarning 20 calls
34 ms ComputeCLGeneratedLinkInputs 1 calls
42 ms Link 1 calls
43 ms SetBuildDefaultEnvironmentVariables 1 calls
46 ms _CheckForUnsupportedCppNETCoreVersion 20 calls
48 ms CoreGenerateAssemblyInfo 20 calls
52 ms _CheckForLanguageAndFeatureCombinationSupport 20 calls
56 ms GenerateSatelliteAssemblies 14 calls
56 ms GetAssemblyAttributes 20 calls
57 ms _ComputeSkipAnalyzers 79 calls
60 ms ResolveCodeAnalysisRuleSet 23 calls
65 ms CheckForImplicitPackageReferenceOverrides 20 calls
68 ms GetCopyToOutputDirectoryXamlAppDefs 60 calls
70 ms _GetProjectJsonPath 20 calls
73 ms Protobuf_PrepareCompile 4 calls
73 ms GetAssemblyVersion 20 calls
74 ms _CopyAppConfigFile 16 calls
102 ms MarkupCompilePass1 1 calls
104 ms ResolveLockFileCopyLocalFiles 20 calls
106 ms _CollectTargetFrameworkForTelemetry 20 calls
107 ms ExpressionBuildExtension 59 calls
110 ms ExpandSDKReferences 80 calls
111 ms _BeforeVBCSCoreCompile 79 calls
113 ms _Protobuf_GatherStaleBatched 14 calls
117 ms ResolveSDKReferences 80 calls
121 ms CleanXsdCodeGen 59 calls
121 ms CreateGeneratedAssemblyInfoInputsCacheFile 20 calls
122 ms ClCompile 1 calls
122 ms GetTargetFrameworksWithPlatformForSingleTargetFramework 78 calls
130 ms GetTargetPathWithTargetPlatformMoniker 79 calls
135 ms FileClassification 59 calls
149 ms ValidationExtension 59 calls
150 ms CopyAutoMapperAssembly 6 calls
155 ms GenerateBuildDependencyFile 20 calls
155 ms BuildOnlySettings 79 calls
156 ms CheckForDuplicateItems 20 calls
158 ms _CopyOutOfDateSourceItemsToOutputDirectory 58 calls
158 ms ApplyImplicitVersions 20 calls
158 ms _PopulateCommonStateForGetCopyToOutputDirectoryItems 80 calls
160 ms _GetRestoreProjectStyle 20 calls
164 ms CreateManifestResourceNames 5 calls
183 ms GenerateTargetFrameworkMonikerAttribute 79 calls
192 ms PreXsdCodeGen 59 calls
194 ms _SetTargetFrameworkMonikerAttribute 79 calls
195 ms Build 80 calls
196 ms _CheckForCompileOutputs 80 calls
196 ms _GenerateSatelliteAssemblyInputs 80 calls
220 ms _SetEmbeddedWin32ManifestProperties 79 calls
225 ms _GenerateCompileInputs 79 calls
238 ms GetFrameworkPaths 80 calls
254 ms PrepareForBuild 80 calls
272 ms ResolveComReferences 1 calls
280 ms GenerateSerializationAssemblies 1 calls
284 ms GetTargetFrameworks 78 calls
286 ms _GetCopyToOutputDirectoryItemsFromThisProject 80 calls
316 ms GetReferenceAssemblyPaths 80 calls
345 ms _ComputeUserRuntimeAssemblies 20 calls
394 ms _CopyOutOfDateSourceItemsToOutputDirectoryAlways 2 calls
402 ms PostBuild 4 calls
431 ms SplitResourcesByCulture 80 calls
480 ms ResolvePackageAssets 20 calls
668 ms AssignTargetPaths 80 calls
965 ms _CheckForInvalidConfigurationAndPlatform 80 calls
1201 ms CopyFilesToOutputDirectory 80 calls
1437 ms CoreResGen 79 calls
1443 ms _SplitProjectReferencesByFileExistence 80 calls
1723 ms AssignProjectConfiguration 70 calls
1744 ms CoreCompile 79 calls
3608 ms ResolveLockFileReferences 20 calls
3660 ms ImplicitlyExpandDesignTimeFacades 59 calls
4645 ms PostBuildEvent 7 calls
4820 ms _CopyFilesMarkedCopyLocal 71 calls
5002 ms ImplicitlyExpandNETStandardFacades 59 calls
6157 ms GetTargetFrameworksWithPlatformFromInnerBuilds 10 calls
6522 ms _GetCopyToOutputDirectoryItemsFromTransitiveProjectReferences 80 calls
8423 ms GetCopyToOutputDirectoryItems 80 calls
14762 ms FindReferenceAssembliesForReferences 79 calls
15969 ms _GenerateCompileDependencyCache 79 calls
15971 ms _ComputeReferenceAssemblies 20 calls
16716 ms IncrementalClean 79 calls
17131 ms _HandlePackageFileConflicts 79 calls
37032 ms _CleanGetCurrentAndPriorFileWrites 79 calls
46860 ms _GetProjectReferenceTargetFrameworkProperties 80 calls
91992 ms ResolveAssemblyReferences 80 calls
1123554 ms ResolveProjectReferences 80 calls
Task Performance Summary:
0 ms ProtoToolsPlatform 4 calls
2 ms CreateItem 5 calls
2 ms GenerateBindingRedirects 1 calls
2 ms FileClassifier 1 calls
3 ms GetFrameworkPath 79 calls
5 ms GetOutOfDateItems 1 calls
8 ms CheckForImplicitPackageReferenceOverrides 20 calls
10 ms RC 1 calls
25 ms AllowEmptyTelemetry 20 calls
25 ms GetAssemblyVersion 20 calls
28 ms ProtoCompilerOutputs 4 calls
32 ms ProtoReadDependencies 4 calls
42 ms Link 1 calls
43 ms SetEnv 8 calls
43 ms ResolveCodeAnalysisRuleSet 23 calls
63 ms MakeDir 101 calls
84 ms CreateCSharpManifestResourceName 7 calls
87 ms GetRestoreProjectStyleTask 20 calls
99 ms MarkupCompilePass1 1 calls
107 ms AssignCulture 81 calls
120 ms CL 2 calls
120 ms GetReferenceAssemblyPaths 59 calls
123 ms CheckForDuplicateItems 60 calls
128 ms ApplyImplicitVersions 20 calls
131 ms Delete 139 calls
169 ms FindAppConfigFile 79 calls
174 ms WriteLinesToFile 100 calls
182 ms Touch 77 calls
257 ms ResolveComReference 1 calls
272 ms Message 246 calls
279 ms SGen 1 calls
376 ms AddFacadesToReferences 3 calls
419 ms ResolvePackageAssets 20 calls
826 ms AssignTargetPath 540 calls
945 ms GenerateResource 4 calls
1526 ms ReadLinesFromFile 80 calls
1570 ms GetDependsOnNETStandard 57 calls
1583 ms AssignProjectConfiguration 70 calls
1948 ms Hash 99 calls
3071 ms RemoveDuplicates 158 calls
3206 ms GetReferenceNearestTargetFrameworkTask 70 calls
3273 ms JoinItems 20 calls
5045 ms Exec 11 calls
5246 ms Copy 234 calls
5592 ms FindUnderPath 403 calls
7557 ms CallTarget 219 calls
9394 ms ResolvePackageFileConflicts 79 calls
13711 ms ConvertToAbsolutePath 79 calls
91537 ms ResolveAssemblyReference 79 calls
1170684 ms MSBuild 327 calls
Anyone knows if/how I can get my configuration to do the minimum required actions?
You are missing a nuget restore task on your project.
MSBuild command line does not execute the nuget restore task automatically but VS IDE does.
So I suggest you could add a additional target for restore.
Note: you should change the content target to use Outputs="$(TargetDir)$(TargetFileName)" to make the target find the final output file.
Solution One
If your projects are all net core projects, you could directly restore the missing packages like this:
msbuild xxx\xxx.csproj -t:restore,build -p:RestorePackagesConfig=true
Solution Two
Or just integrate them into the csproj file:
<Target Name="Build"
Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="#(TargetPathWithTargetPlatformMoniker)"
Inputs="#(Compile);#(Content)" Outputs="$(TargetDir)$(TargetFileName)">
<Csc Sources="#(Compile)" OutputAssembly="$(TargetFileName)"/>
</Target>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="msbuild -t:restore -p:RestorePackagesConfig=true" />
</Target>
Then, invoke the command line to build it:
msbuild xxx\xxx.csproj -t:build
Conclusion
I suggest you would better use Solution One. Once, you already restored the nuget packages, you do not have to add -t:restore the second time, just use msbuild xxx\xxx.csproj -t:build.
After updating the UWP app, I get many crash from the different sections of the app
STOWED_EXCEPTION_Microsoft.Data.Sqlite.SqliteException_80131500***APP-NAME***.dll!Microsoft::Data::Sqlite::SqliteCommand.ExecuteReader
Which did not happend in previous version, I also did not change the database access code section nor updated/reinstalled the EF Sqlite nugget package.
Here are Stacktrace i have received from users:
Thanks
Frame Image Function Offset
0 Microsoft.Data.Sqlite.dll Microsoft::Data::Sqlite::Interop::MarshalEx.ThrowExceptionForRC 0x0000000000000067
1 Microsoft.Data.Sqlite.dll Microsoft::Data::Sqlite::SqliteCommand.ExecuteReader 0x000000000000012F
2 Microsoft.Data.Sqlite.dll Microsoft::Data::Sqlite::SqliteCommand.ExecuteDbDataReader 0x000000000000000B
3 EntityFramework.Relational.dll Microsoft::Data::Entity::Storage::Internal::RelationalCommand::__c__DisplayClass17_0._ExecuteReader_b__0$catch$0 0x0000000000000013
4 SharedLibrary.dll System::Func$1_System::__Canon_.Invoke 0x0000000000000013
5 EntityFramework.Relational.dll Microsoft::Data::Entity::Storage::Internal::RelationalCommand.Execute_System.__Canon_$catch$0 0x00000000000000C1
6 EntityFramework.Relational.dll Microsoft::Data::Entity::Storage::Internal::RelationalCommand.ExecuteReader 0x0000000000000057
7 EntityFramework.Relational.dll Microsoft::Data::Entity::Query::Internal::QueryingEnumerable::Enumerator.MoveNext 0x000000000000008B
8 EntityFramework.Relational.dll Microsoft::Data::Entity::Query::QueryMethodProvider.GetResult_System.Int32_ 0x000000000000003D
9 APPNAME.McgInterop.dll _$ILCT$::$ILT$ReflectionDynamicInvoke$.InvokeRetOI_System.__Canon,System.Int32 0x0000000000000061
10 SharedLibrary.dll System::InvokeUtils.CallIHelperStaticCallWithInstantiation 0x0000000000000023
11 SharedLibrary.dll System::InvokeUtils.CallDynamicInvokeMethod 0x0000000000000119
12 System.Linq.Expressions System::Linq::Expressions::Interpreter::MethodInfoCallInstruction.InvokeWorker$catch$0 0x0000000000000017
13 System.Linq.Expressions System::Linq::Expressions::Interpreter::MethodInfoCallInstruction.Invoke 0x0000000000000009
14 System.Linq.Expressions System::Linq::Expressions::Interpreter::MethodInfoCallInstruction.Run 0x0000000000000065
15 System.Linq.Expressions System::Linq::Expressions::Interpreter::Interpreter.Run 0x0000000000000027
16 System.Linq.Expressions System::Linq::Expressions::Interpreter::LightLambda.Run 0x000000000000009B
17 SharedLibrary.dll System::Runtime::CompilerServices::ConditionalWeakTable$2_System::__Canon,System::__Canon_::CreateValueCallback.InvokeObjectArrayThunk 0x0000000000000037
18 EntityFramework.Core.dll Microsoft::Data::Entity::Query::Internal::QueryCompiler::__c__DisplayClass18_1$1_System::Int32_._CompileQuery_b__1$catch$0 0x0000000000000059
19 SharedLibrary.dll System::Comparison$1_System::__Canon_.Invoke 0x0000000000000013
20 EntityFramework.Core.dll Microsoft::Data::Entity::Query::Internal::QueryCompiler.Execute_System.Int32_ 0x000000000000003D
21 EntityFramework.Core.dll Microsoft::Data::Entity::Query::Internal::EntityQueryProvider.Execute_System.Int32_ 0x0000000000000033
22 System.Linq.Queryable.dll System::Linq::Queryable.Count_System.Int32_ 0x0000000000000121
23 APPNAME*.exe InstagramDownloader::pgHome._imgDownloader_b__15_4 0x0000000000000167
24 APPNAME*.McgInterop.dll Windows::System::Threading::TimerElapsedHandler.Invoke 0x000000000000000F
25 APPNAME*.McgInterop.dll McgInterop::ReverseComSharedStubs.Proc_ 0x0000000000000015
26 SharedLibrary.dll System::Runtime::ExceptionServices::ExceptionDispatchInfo.Throw 0x0000000000000019
27 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.ThrowForNonSuccess 0x0000000000000053
28 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.HandleNonSuccessAndDebuggerNotification 0x000000000000002D
29 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.ValidateEnd 0x000000000000001D
30 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.GetResult 0x000000000000000B
31 APPNAME*.exe InstagramDownloader::pgHome::_imgDownloader_d__15.MoveNext 0x00000000000015AF
32 SharedLibrary.dll System::Runtime::ExceptionServices::ExceptionDispatchInfo.Throw 0x0000000000000019
33 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.ThrowForNonSuccess 0x0000000000000053
34 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.HandleNonSuccessAndDebuggerNotification 0x000000000000002D
35 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.ValidateEnd 0x000000000000001D
36 System.Private.Threading System::Runtime::CompilerServices::TaskAwaiter.GetResult 0x000000000000000B
37 APPNAME*.exe InstagramDownloader::pgHome::_btnDownload_Click_d__17.MoveNext 0x000000000000025D
38 APPNAME*.McgInterop.dll McgInterop::McgHelpers.ThrowFailed 0x0000000000000033
39 APPNAME*.McgInterop.dll McgInterop::ComCallHelpers.ComCall__HRESULT 0x00000000000000A9
40 APPNAME*.McgInterop.dll McgInterop::ForwardComSharedStubs.Func_TResult___System.__Canon,_System.__Canon_ 0x000000000000002B
41 APPNAME*.McgInterop.dll Windows::UI::Popups::MessageDialog.ShowAsync 0x0000000000000011
42 APPNAME*.exe InstagramDownloader::pgHome::_btnDownload_Click_d__17.MoveNext$catch$0 0x000000000000002F
43 SharedLibrary.dll System::Runtime::ExceptionServices::ExceptionDispatchInfo.Throw 0x0000000000000019
44 System.Private.Threading System::Runtime::CompilerServices::AsyncMethodBuilderCore::__c._ThrowAsync_b__9_0 0x0000000000000013
45 System.Private.Threading System::Threading::WinRTSynchronizationContext::Invoker.InvokeCore 0x0000000000000033
I suggest updating all SQLite-related packages on NuGet as well as the SQLite extension for Visual Studio (via Tools -> Extensions and Updates...)
Update
As I have learned, you use EntityFrameworkCore, which works only with Windows 10 Fall Creators Update and newer and will not work on older versions of UWP. To get rid of the issues, you will have to set your app to have minimum SDK version 16299 (FCU). If you need to support older versions, you will have to work without Entity Framework for now...
I have taken the data from a web browser. Now I want to export the data from the web browser to excel.
I get data from web browser such formats:
1
20 143
10 180
1 653
8 310
1 280
1 280
1 280
1 280
:
:
:
2
19 339
9 800
1 767
7 773
1 280
1 280
1 280
1 280
H2:DA_MI
H2:DA_MI
H2:DA_MI