Windows RT 8.1 Sharpdevelop Issue (MSB3644) (MSB3248) - windows

I've signed the Windows RT Desktop version of Sharpdevelop, but I continuously get this error
Build started.
Warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
Error MSB3248: Parameter "SearchPaths" has invalid value "{CandidateAssemblyFiles}%3b
%3b
{HintPathFromItem}%3b
{TargetFrameworkDirectory}%3b
{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}%3b
%3b
{GAC}%3b
{RawFileName}%3b
bin\Release\System.winmd". Illegal characters in path.
Build failed. (00:00:01.5781253)
All I need to do is get the exe compiled. I can sign it separately.

Related

regasm on a .net framework library now wants netstandard 2.1.0.0

I have a .net framework 4.8 library I have been working on for months in VS19. The project is configured to "Register for COM interop" (which runs regasm.exe on the dll).
Recently (in last few days) I installed VS22 and have been playing around with some .net core projects in here.
I have come back to my original library in VS19 which when compiling now reports (during the regasm call):
Cannot register assembly "X:\<removed>\my-lib.dll". Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
I get the same result from manually trying to register the dll or trying to load and compile the project in VS22. I have installed all VS19 updates and rebooted the computer, no change.
It is my understanding that netstandard 2.1 has nothing to do with framework and netstandard is not specifically mentioned anywhere in my code or config. The gacutil /l output shows netstandard 2.0.0.0 is installed but nothing else.
It would seem the installation of VS22 may have shifted something in my environment and I'm not sure how to correct it?

A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll

I try-converted a windows form app to .NET 5 and I was able to build and run it last week. Now, it has an error building.
NETSDK1148 A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly. APP C:\Program Files\dotnet\sdk\5.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Windows.targets
Target framework for the csproj is <TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
I'm unsure what to change/update. Error is a little vague.
Removing Microsoft.Bcl.Build from the project fixed this issue. See https://github.com/dotnet/sdk/issues/16360

What should I do about unstable packages in Visual Studio 2017, error: was restored using '.NETFramework,Version=v4.6.1' instead of target framework

I'm using Visual Studio to make an app. It works on Android and I'm trying to get it to work on iOS, but I need to resolve this unstable package in my dependencies.
Any advice about what I should do?
Error Message:
Package 'OxyPlot.Xamarin.Forms 1.1.0-unstable0011' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework'.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
That's a warning message, not an error message, and this is by design.
Please refer to https://learn.microsoft.com/en-us/nuget/reference/target-frameworks for target framework information.
.NET Standard 2.0 and .NET 4.6.1 have a huge surface area overlap.
For this Visual Studio and NuGet have added the concept of a fallback framework, where when a user tries to install a .NET Standard package in a .NET Framework project, it will allow the installation but warn the user that it's not 100% compatible and that there may be certain cases in which this does not work.
Related
https://github.com/NuGet/Home/issues/5192
https://github.com/NuGet/Home/wiki/Enable-.NET-Core-2.0-projects-to-work-with-.NET-Framework-4.6.1-compatible-packages

Xamarin solution only builds with MSBuildPlatform.x86

I have the following question:
I'm using CakeBuild to build my Xamarin.Forms solution on a Windows computer (Windows 10).
Everything builds fine when I'm using the following command:
MSBuild("MyXamarinApp.sln", configurator =>
configurator.SetConfiguration("Debug")
.SetMSBuildPlatform(MSBuildPlatform.x86));
But if I remove "SetMSBuildPlatform(MSBuildPlatform.x86)" it uses internally "MSBuildPlatform.x64" and then I get the following error:
(_GetReferenceAssemblyPaths target) ->
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(566,2): error MSB3644: The reference assemblies for framework "MonoAndroid,Version=v1.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
Can someone explain this behaviour? Can I only use the x86 version of MSBuild to build Xamarin projects?
You need to set that platform in you Android application target. (AndroidProject -> Options).
x86 that desktop architecture. You can use it to build and test on simulator, but for a real device you will need to select at least one mobile architecture (any architecture that's not x86 or x86_64)

Json.Net NuGet (NuPack) Package Reference unable to find assembly compatible with target framework

I am getting an error when trying to add the Json.net package reference through the NuGet / NuPack Add Package Reference Dialog. The error I get is:
Unable to find assembly references that are compatible with the target framework 'Silverlight,Version=4.0,Profile=WindowsPhone'
I have the latest version of both the Windows Phone 7 SDK and the Package Manager tools installed. This is running in Visual Studio 2010.
Has anyone else run into this error?
According to James Newton-King (author of Json.NET), you can use the Silverlight 3.0 version.
http://json.codeplex.com/Thread/View.aspx?ThreadId=226910
Unfortunately the NuGet package doesn't properly indicate Windows Phone 7 support. So you'll have to add the reference the old-fashioned way. (e.g. Copy the assembly into a directory such as ~\lib\Json.NET - where ~ is your solution root - and Project... Add Reference...)

Resources