Closed
Description
Steps to reproduce
- Create a console project
dotnet new console -n MyConsole
- Create a class library project
dotnet new classlib -n MyClass
- Reference class library project in the console project MyConsole.csproj file using:
<ItemGroup>
<Reference Include="MyClass">
<HintPath>path_to_library/MyClass.dll</HintPath>
</Reference>
</ItemGroup
4.Use MyClass in MyConsole
using System;
using MyClass;
namespace MyConsole
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(MyClass.HelloWorld);
}
}
}
- Run MyConsole application
dotnet run
Expected behavior
Application executes
Actual behavior
Application crashes with:
Unhandled Exception: System.IO.FileNotFoundException:
Could not load file or assembly
'MyClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
The system cannot find the file specified.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc4-004893)
Product Information:
Version: 1.0.0-rc4-004893
Commit SHA-1 hash: ca4d0b8fbb
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/1.0.0-rc4-004893
Metadata
Metadata
Assignees
Labels
No labels