Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paket VS extension breaks .NET core project files when Analyzers are added by libraries (AWSSDK.DynamoDBv2) #139

Open
MiloszKrajewski opened this issue May 17, 2017 · 0 comments

Comments

@MiloszKrajewski
Copy link

MiloszKrajewski commented May 17, 2017

Description

Paket VS extensions creates ItemGroup with Analyzer which .NET core does NOT understand.

<ItemGroup xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<Analyzer Include="..\packages\AWSSDK.DynamoDBv2\analyzers\dotnet\cs\AWSSDK.DynamoDBv2.CodeAnalysis.dll">
		<Paket>True</Paket>
	</Analyzer>
</ItemGroup>

The errors message is The attribute "xmlns" in element <ItemGroup> is unrecognized and project cannot be loaded anymore (nor built).

Command line version does NOT do that.

Repro steps

mkdir solution && cd solution
curl -L -o paket.cmd http://bit.ly/2ooaInt
paket init
echo framework netcoreapp11 >> paket.dependencies
echo nuget AWSSDK.DynamoDBv2 >> paket.dependencies

dotnet new sln

mkdir project && cd project && dotnet new console
echo AWSSDK.DynamoDBv2 > paket.references
cd ..

dotnet sln solution.sln add project\project.csproj

paket install && dotnet restore && dotnet build .

So far so good. All works from command-line. Now:

  • Open solution.sln in Visual Studio 2017
  • Add paket.dependencies to solution
  • Right-click paket.dependencies and select Install

Project fails to load and no longer builds:

dotnet restore

ends with:

C:\dev\solution\project\project.csproj(7,14): error MSB4066: The attribute "xmlns" in element <ItemGroup> is unrecognized.

Expected behavior

Should work.

Actual behavior

It doesn't :-)

Known workarounds

Use command-line paket only.

Related information

  • Windows 10
  • Visual Studio 2017
  • Paket CLI: 4.8.5 (tried paket 5.0.0-beta as well, assuming that it may help Paket VS but it didn't)
  • Paket VS extension: 0.31.6 (09/05/2017)
  • Project targets .NET Core 1.0.3
  • .NET 4.6.2 available on PC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant