Unable to debug/run netcoreapp1.1 webapi project which has a reference to netstandard1.6 class library
See original GitHub issueUsing Visual Studio Code 1.12.2 on Windows 7 Pro
Steps to reproduce
- Create a webapi (dotnet new webapi) “TestWebApi”
- Create a class library (dotnet new classlib) “TestClassLibrary”
- Add Microsoft.AspNetCore.Mvc reference to “TestClassLibrary”
- Change TargetFramework for “TestClassLibrary” to netstandard1.6 (in TestClassLibrary.csproj)
- Cut and past Controller folder from “TestWebApi” to “TestClassLibrary”
- Add “TestClassLibrary” reference to “TestWebApi” (dotnet add reference …\TestClassLibrary\TestClassLibrary.csproj)
- Modify ConfigureServices (Startup.cs) method in “TestWebApi” as services.AddMvc() .AddApplicationPart(typeof(ValuesController).GetTypeInfo().Assembly) .AddControllersAsServices(); and also add appropriate using statement
- Hit F5 to debug
Expected behavior
Web api to build and run without any issues and also able to access sample api method (api/values)
Actual behavior
Build error: System.DllNotFoundException: Unable to load DLL ‘combase.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Microsoft.Win32.UnsafeNativeMethods.RoGetActivationFactory(String activatableClassId, Guid& iid, Object& factory) at System.Threading.Tasks.AsyncCausalityTracer…cctor()
Note: dotnet build
on individual projects work fine
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.4)
Product Information: Version: 1.0.4 Commit SHA-1 hash: af1e6684fd
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\1.0.4
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (11 by maintainers)
Top GitHub Comments
I’m having the same issue on a Windows 7 machine. Have you been able to resolve this? Combase.dll is not present in the System32 folder.
Seems like this issue has been resolved. Closing.