ctaggart / google-cloud-dotnet

Google Cloud Client Library for .NET
https://googlecloudplatform.github.io/google-cloud-dotnet/
Apache License 2.0
0 stars 0 forks source link

netstandard builds error on AssemblyAttributes #4

Open ctaggart opened 7 years ago

ctaggart commented 7 years ago
       CoreCompile:
         C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\RunCsc.cmd /noconfig /nowarn:1701,1702,1705,1701,1702 /n
ostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:TRACE;RELEASE;NETSTANDARD1_5 /debug:portable /filealign:
512 /nologo /optimize+ /out:obj\Release\netstandard1.5\Google.Cloud.Tools.Common.dll /target:library /utf8output /d
eterministic+ DirectoryLayout.cs UserErrorException.cs "C:\Users\cameron\AppData\Local\Temp\.NETStandard,Version=v1
.5.AssemblyAttributes.cs" obj\Release\netstandard1.5\Google.Cloud.Tools.Common.AssemblyInfo.cs

    3>C:\Users\cameron\AppData\Local\Temp\.NETStandard,Version=v1.5.AssemblyAttributes.cs(4,20): error CS0400: The
 type or namespace name 'System' could not be found in the global namespace (are you missing an assembly reference?
) [C:\Users\cameron\cs\google-cloud-dotnet\tools\Google.Cloud.Tools.Common\Google.Cloud.Tools.Common.csproj]
     3>obj\Release\netstandard1.5\Google.Cloud.Tools.Common.AssemblyInfo.cs(6,12): error CS0246: The type or namesp
ace name 'System' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\camero
n\cs\google-cloud-dotnet\tools\Google.Cloud.Tools.Common\Google.Cloud.Tools.Common.csproj]
ctaggart commented 7 years ago
     1>Done Building Project "C:\Users\cameron\cs\google-cloud-dotnet\tools\Google.Cloud.Tools.sln" (Build target(s)) -- FAILED.

Build FAILED.

       "C:\Users\cameron\cs\google-cloud-dotnet\tools\Google.Cloud.Tools.sln" (Build target) (1) ->
       "C:\Users\cameron\cs\google-cloud-dotnet\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj" (default targ
et) (5) ->
       "C:\Users\cameron\cs\google-cloud-dotnet\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj" (default targ
et) (5:2) ->
       (CoreCompile target) ->
         C:\Users\cameron\AppData\Local\Temp\.NETStandard,Version=v1.3.AssemblyAttributes.cs(4,20): error CS0400: The type or nam
espace name 'System' could not be found in the global namespace (are you missing an assembly reference?) [C:\Users\cameron\cs\goo
gle-cloud-dotnet\tools\Google.Cloud.ClientTesting\Google.Cloud.ClientTesting.csproj]

C:\Users\cameron\AppData\Local\Temp.NETStandard,Version=v1.3.AssemblyAttributes.cs

// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v1.3", FrameworkDisplayName = "")]

https://www.nuget.org/packages/System.Runtime/

https://apisof.net/catalog/System.Runtime.Versioning.TargetFrameworkAttribute

ctaggart commented 7 years ago

Similar error here: https://github.com/dotnet/sdk/issues/255

Here is the current csrpoj:

<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />

  <PropertyGroup>
    <TargetFrameworks>netstandard1.5;net451</TargetFrameworks>
    <AssemblyName>Google.Cloud.Tools.Common</AssemblyName>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="**\*.cs" />
    <EmbeddedResource Include="**\*.resx" />
    <EmbeddedResource Include="compiler\resources\**\*" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Sdk">
      <Version>1.0.0-alpha-20161104-2</Version>
      <PrivateAssets>All</PrivateAssets>
    </PackageReference>
    <PackageReference Include="NETStandard.Library">
      <Version>1.6.1</Version>
    </PackageReference>
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
  </ItemGroup>

  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
  </PropertyGroup>

  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>