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

The reference assemblies for framework ".NETFramework,Version=v3.5" were not found. #6

Open
IARI opened this issue Mar 24, 2017 · 4 comments

Comments

@IARI
Copy link

IARI commented Mar 24, 2017

On Windows 10 with .NET Core installed, when I run build_packages.bat i get the following error:

  Google.Protobuf -> D:\github\protobuf3-for-unity\src\Google.Protobuf\bin\Release\net45\Google.Protobuf.dll
C:\Program Files\dotnet\sdk\1.0.1\Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v3.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [D:\github\protobuf3-for-unity\src\Google.Protobuf\Google.Protobuf.csproj]

I'm thinking, the problem could be related to dotnet/msbuild#1333

I'm rather new to dotnet, so I don't know how to move on.
Is there any chance to get precompiled dll's that work?

@chazix
Copy link

chazix commented Mar 24, 2017

I believe the root of the problem is that .net core's current release isn't compatible with the state of this build. To solve this I installed an older version of .net core : https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1-preview2.1-download.md

@TanukiSharp
Copy link
Member

TanukiSharp commented Mar 29, 2017

Hello @IARI, sorry for the late reply.

As a quick workaround, you can add a file named global.json in the root folder of the solution (beside the build_packages.bat file) that contains the following:

{
    "sdk": {
        "version": "1.0.0-preview2-003156"
    }
}

Note that you need the .NET Core SDK preview 2 (3156) installed on your machine, you can check this in %DOTNET_CORE_INSTALL_FOLDER%\sdk and you should have a folder named 1.0.0-preview2-003156.

The .NET Core install folder should be in C:\Program Files\dotnet if you didn't change it.

Let me know if this helps you to get it compile, and in the meantime I will upload a prebuilt library.

EDIT: I just figured out there is already a prebuilt available here: https://github.com/bitcraftCoLtd/protobuf3-for-unity/releases/tag/v3.0.0_ga_noJIT

Is it enough ? Please let me know if you need something else.

@joelharkes
Copy link

Same issue using 1.0.3 SDK

I found you can use msbuild /p:TargetFramework=net35 **.csproj

to build for net35 framework

@TanukiSharp
Copy link
Member

It's hard to keep up with the pace Microsoft are releasing previews and changes they introduce each time.
I'd rather wait for the tooling to get stable (and especially for Unity to adopt .NET Standard 2.0) before fixing the build process.

In the meantime, if you don't mind please use the prebuilt binaries available in the zip of the download section.

Let me know if there is something else you guys need.

Thanks.

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

4 participants