{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
}
````
3. execute `dotnet new`
4. Edit project.json and add `net451` framework
5. Execute `dotnet restore` then `dotnet build`
6. Execute `dotnet run`
---> Observe everything works correctly
7. `rm global.json`
8. `dotnet migrate`
9. `dotnet build`
---> Observe the following error:
/usr/share/dotnet/sdk/1.0.1/Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5.1" 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. [/home/mshapiro/Code/test/test.csproj]
/usr/share/dotnet/sdk/1.0.1/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error : Assets file '/home/mshapiro/Code/test/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/home/mshapiro/Code/test/test.csproj]
## Environment data
`dotnet --info` output:
```.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/1.0.1
I'm having the same problem when targeting .NET 4.6.
@KallDrexx, did you find any workaround since then?
There is an open issue in the SDK repo about it: https://github.com/dotnet/sdk/issues/335
@dasMulli,
Thanks, setting export FrameworkPathOverride=/usr/lib/mono/4.5/ on Ubuntu and Debian solved the issue for me. cc @KallDrexx
We will track this in the SDK.
Most helpful comment
@dasMulli,
Thanks, setting
export FrameworkPathOverride=/usr/lib/mono/4.5/on Ubuntu and Debian solved the issue for me. cc @KallDrexx