One or more packages are incompatible with .NETCoreApp,Version=v1.0. 0 - asp.net-core

when I am running the asp.net project , this error is coming ? how to resolve this ?
I want to run the asp.net program in vs 2017

Related

How to generate service reference for .netstandard 2

We're migrating our codebase from .net framework to .net 7. To do so, we're converting our infrastructure projects (domain objects, business layer, data layer) to .netstandard 2 so that we can use it in both the old and new versions of the front end web applications while they're being migrated.
I need to generate service references in one of the .netstandard projects but when I try to add a new service under Manage Connected Services, I get the following error.
MSBuild version 17.4.0+18d5aef85 for .NET
C:\Users\geoff\.nuget\packages\system.runtime.compilerservices.unsafe\6.0.0\buildTransitive\netcoreapp2.0\System.Runtime.CompilerServices.Unsafe.targets(4,5): error : System.Runtime.CompilerServices.Unsafe doesn't support netcoreapp2.0. Consider updating your TargetFramework to netcoreapp3.1 or later. [C:\Users\geoff\AppData\Local\Temp\WCFConnectedService\2023_Jan_31_15_49_26\svcutil_bootstrap\SvcutilBootstrapper\SvcutilBootstrapper.csproj]
Build FAILED.
C:\Users\geoff\.nuget\packages\system.runtime.compilerservices.unsafe\6.0.0\buildTransitive\netcoreapp2.0\System.Runtime.CompilerServices.Unsafe.targets(4,5): error : System.Runtime.CompilerServices.Unsafe doesn't support netcoreapp2.0. Consider updating your TargetFramework to netcoreapp3.1 or later. [C:\Users\geoff\AppData\Local\Temp\WCFConnectedService\2023_Jan_31_15_49_26\svcutil_bootstrap\SvcutilBootstrapper\SvcutilBootstrapper.csproj]
0 Warning(s)
1 Error(s)
Any idea how I can get this working with the current .netstandard 2 setup?

MsBuild failing for .Net Standard project with error "Package System.Security.Cryptography.ProtectedData, version x.x.x was not found"

Project Setup : Mixed framework solution
.Net Framework 4.6.2 projects in solution : 15
.Net Standard 2.0 projects in solution - 1
Development Machine
Visual Studio 2017(15.7.4) : Builds without any errors
Build Server
TeamCity Version 2017.1.3
Build Steps
Nuget Restore(3.4.4)
dotnet Restore
MSBuild( Build Tools 2017), Tools Version 15.0
Build fails with following error in the .net standard 2.0 project : [ResolvePackageAssets] C:\Program Files\dotnet\sdk\2.1.301\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(198, 5): Package System.Security.Cryptography.ProtectedData, version 4.4.0 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions.
What's interesting is I can't find reference or use of System.Security.Cryptography.ProtectedData anywhere in the project. Any help is greatly appreciated.
P.S - Can't use dotnet build, as the solution needs building of licenses.licx files, and the component which builds it (Microsoft.Build.Tasks.LC) is not ported to .Net Core. The suggestion from various posts was to use MsBuild.exe

ASP.NET Core 2.0 The default XML namespace of the project must be the MSBuild XML namespace

I have an ASP.NET Core 2.0 project developed using VS2017. I am getting the following error from our build server which uses TFS2015.
The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
I got this error when I initially setup the build, but after reading through various posts I resolved the issue by installing the VS2017 SDK and build tools on the build server. All well and good.
I have now added a unit testing project and getting the error again. I am also getting this warning.
Warning MSB4078 The project file is not supported by MSBuild and cannot be built
I get this error when the build attempts to build the solution file. I have installed the latest version of MSBUILD on the build server. What else do I need to do?

NuGet restore works, but compile fails on build server

I am trying to build a .NET 4.6 project using MSBuild 15 on our build server (using CruiseControl).
The project has a NuGet package reference (to Oracle.ManagedDataAccess) and it gets restored correctly.
However, the build task fails with the error "The type or namespace name 'Oracle' could not be found".
I have tried building the project in VS 2017 on the build server using the same account, and it works.
I expected MSBuild to retrieve the package contents from the same location, but apparently it can't. What could be the reason?
The error seems to have been caused because MSBuild 14 was used in the build task instead of MSBuild 15. Not sure exactly why that made it fail, but it works now.

.NET Blazor Build error

I have tried to run the out of the box Blazor application to try out C# WebAssembly. I am running into issues when trying to run it different ways. I have also tried to hack the runtimeconfig.json according to this https://github.com/dotnet/cli/issues/7543
Running IIS Express
Running BlazorApplication1
The program '[42032] dotnet.exe' has exited with code -2147450749 (0x80008083).
Running in command line
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.0.0-preview3-25512-01' was not found.
- Check application dependencies and target a framework version installed at:
\
- Alternatively, install the framework version '2.0.0-preview3-25512-01'.
You need to have the 2.1 preview of the .net core framework installed for Blazor to work: download here