RickStrahl / AlbumViewerVNext

West Wind Album Viewer ASP.NET Core and Angular Sample
507 stars 353 forks source link

Building project in Visual Studio 15.3.0 or from dotnet 2.0 cli results in errors... #9

Closed anwalkers closed 7 years ago

anwalkers commented 7 years ago

From within Visual Studio:

To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Build started: Project: Westwind.Utilities, Configuration: Debug Any CPU ------
2>------ Build started: Project: AlbumViewerAngular, Configuration: Debug Any CPU ------
2>Validating Web Site
2>Building directory '/src/scripts/'.
2>
2>Validation Complete
1>obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(14,12,14,54): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute
1>obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(15,12,15,60): error CS0579: Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute
1>obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(19,12,19,54): error CS0579: Duplicate 'System.Reflection.AssemblyProductAttribute' attribute
1>Done building project "Westwind.Utilities.csproj" -- FAILED.
3>------ Build started: Project: AlbumViewerBusiness, Configuration: Debug Any CPU ------
3>CSC : error CS0006: Metadata file 'D:\github\AlbumViewerVNext\src\Westwind.Utilities\bin\Debug\netstandard2.0\Westwind.Utilities.dll' could not be found
3>Done building project "AlbumViewerBusiness.csproj" -- FAILED.
4>------ Build started: Project: AlbumViewerNetCore, Configuration: Debug Any CPU ------
4>CSC : error CS0006: Metadata file 'D:\github\AlbumViewerVNext\src\AlbumViewerBusiness\bin\Debug\netstandard2.0\AlbumViewerBusiness.dll' could not be found
4>CSC : error CS0006: Metadata file 'D:\github\AlbumViewerVNext\src\Westwind.Utilities\bin\Debug\netstandard2.0\Westwind.Utilities.dll' could not be found
4>Done building project "AlbumViewerNetCore.csproj" -- FAILED.
========== Build: 1 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

From CLI:

Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute [D:\github\AlbumViewerVNext\src\Westwind.Utilities\Westwind.Utilities.csproj]
obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(15,12): error CS0579: Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute [D:\github\AlbumViewerVNext\src\Westwind.Utilities\Westwind.Utilities.csproj]
obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(19,12): error CS0579: Duplicate 'System.Reflection.AssemblyProductAttribute' attribute [D:\github\AlbumViewerVNext\src\Westwind.Utilities\Westwind.Utilities.csproj]

Build FAILED.

obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(14,12): error CS0579: Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute [D:\github\AlbumViewerVNext\src\Westwind.Utilities\Westwind.Utilities.csproj]
obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(15,12): error CS0579: Duplicate 'System.Reflection.AssemblyConfigurationAttribute' attribute [D:\github\AlbumViewerVNext\src\Westwind.Utilities\Westwind.Utilities.csproj]
obj\Debug\netstandard2.0\Westwind.Utilities.AssemblyInfo.cs(19,12): error CS0579: Duplicate 'System.Reflection.AssemblyProductAttribute' attribute [D:\github\AlbumViewerVNext\src\Westwind.Utilities\Westwind.Utilities.csproj]
    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:02.09
RickStrahl commented 7 years ago

Hmmm... that builds for me with the latest build. This error was an issue in the pre-release build (which was flagging this as a warning not an error), but I fixed those issues a couple of days ago.

Make sure you have the latest Github build.

rjblair commented 7 years ago

I had to apply

<PropertyGroup>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
  </PropertyGroup>

to the AlbumViewBusiness.csproj & WestWind.Utilities.csproj to eliminate this issue