question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with generating SDK from .NET Core assembly.

See original GitHub issue

Hi Rico,

Could you please help.

When I try to generate SDK from .net core assembly project it rises an exception:

tem.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.JsonPatch, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.JsonPatch, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

Check if .NET Core is installed and 'dotnet' is globally available.

But the assembly exists.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:41 (31 by maintainers)

github_iconTop GitHub Comments

6reactions
RicoSutercommented, Feb 11, 2018

Wow, this is really amazing!

  <Target Name="NSwag" AfterTargets="Build">
    <Copy SourceFiles="@(Reference)" DestinationFolder="$(OutDir)References" />
    <Exec Command="$(NSwagExe_Core20) run nswag.json /variables:Configuration=$(Configuration)" />
    <RemoveDir Directories="$(OutDir)References" />
  </Target>
4reactions
cvallancecommented, Jul 25, 2018

@RSuter & @slang25 - this was causing an issue in our project… we reference a dll that we have locally. So we have something like:

<Reference Include="OurNamespace.ServerClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
  <HintPath>..\ExternalLibraries\OurNamespace.ServerClient.dll</HintPath>
</Reference>

But now the @(Reference) contains the string OurNamespace.ServerClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null which didn’t work with Copy because it isn’t a file. I think it’s the same issue @electricessence was running into.

Anyway, to cut a long story short, this fixed it:

<Copy SourceFiles="@(ReferencePath)" DestinationFolder="$(OutDir)References" />

Let me know if that’s going to mess anything up… otherwise I suggest you update the documentation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
NET SDK error list - .NET CLI
NETSDK1090, The supplied assembly '{0}' is not valid. Cannot generate a CLSIDMap from it. NETSDK1091, Unable to find a .NET Core COM host....
Read more >
The reference assemblies for framework .NETCore ...
I was getting the same error message. The resolution was to install the latest version of Visual Studio 2019. I had version 16.6...
Read more >
Can't load .Net Core Web API Assembly in NSwagStudio
I seem to have a problem loading .Net Core Web API assembly in NSwagStudio. I have a reference package (NuGet) for 'Microsoft.AspNetCore.
Read more >
Generate .NET Assembly and Build .NET Application
This example shows how to create a .NET assembly from a MATLAB ® function and integrate the generated assembly into a .NET application....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found