天天看点

Can't remove netstandard folder from output path (.net standard)对于asp.net web site项目

https://developercommunity.visualstudio.com/content/problem/30940/cant-remove-netstandard-folder-from-output-path.html

You can set the following in your .csproj to disable this behavior.

<PropertyGroup>

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

</PropertyGroup>      

https://github.com/NuGet/Home/issues/4488

This is going to be a very common scenario. People are creating new .NET Standard projects and will add p2p refs to them from their existing "legacy" projects. -- Xamarin, Desktop, etc.

The right binaries won't be in the output directory and people will be confused by this broken behavior.

The only workaround is that you have to add 

<RestoreProjectStyle>PackageReference</RestoreProjectStyle>

to the legacy project.

对于asp.net web site项目

https://github.com/dotnet/standard/issues/481

ASP.NET web applications and web sites

  1. Web applications and web sites don't support automatic binding redirect generation. In order to resolve binding conflicts, you need to double click the warning in the error list and Visual Studio will add them to your

    web.config

    file.
  2. In web application projects, you should enable

    PackageReference

    like mentioned above. In web sites, you cannot use

    PackageReference

    as there is no project file. In that case, you need to install all NuGet packages into your web site that any of the direct or indirect project references depend on.