Open NSP-0123456 opened 2 months ago
It is not entirely a dotnet core solution, so you have to do this:
nuget restore xmlnotepad.sln
echo namespace XmlNotepad { public partial class AppAnalytics { private const string ApiKey="%XMLNOTEPAD_ANALYTICSKEY%"; } } > src\model\ApiKey.cs
msbuild xmlnotepad.sln
I added this to the build instructions.
Working fine in debug, but still fails in release and just using build.cmd
Try loading C:\dev\DevPerso\XmlNotepad\src\XmlNotepad.sln in Visual Studio 2022 and select Release/Any CPU build configuration then select "Build/Rebuild" option. Rebuild should restore all missing packages.
It is exactly what is not working. even on your build script debug is OK release fails.
Hmmm, can check you can access https://www.nuget.org/packages/Newtonsoft.Json/13.0.3 ?
If so, please run git clean -dfx
in the root of your XmlNotepad repo and nuget locals all -clear
to force nuget to download the packages again, then turn on msbuild diagnostic verbosity:
this select the "Rebuild" option and send me the verbose build output? my electronic mail alias at microsoft is clovett.
Also if you run this:
nuget search Newtonsoft.json
Does it show
====================
Source: nuget.org
--------------------
> Newtonsoft.Json | 13.0.3 | Downloads: 4,627,283,248
Json.NET is a popular high-performance JSON framework for .NET
? You might have a corporate environment that is limiting which packages you can use...
Compilation issue from fresh repo clone. did a nuget restore before. I'm trying to compile xml notepad in windows 11 with Visual Studio 2022 v17.9.6. I get an error : error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?) [C:\dev\DevPerso\XmlNotepad\src\Application\Application.csproj]
Newtonsoft.json is in the package folder but compilation fails.