Installed NuGet throws System.IO.FileNotFoundException #470

Closed
opened 2026-01-29 14:37:32 +00:00 by claunia · 3 comments
Owner

Originally created by @MarkoKvyk on GitHub (Jun 21, 2021).

Creating classlibrary and trying to install Markdig.

enter image description here

I can use usings in code, but I'm trying to start debugging and it throws it:

enter image description here

link to library.
https://github.com/xoofx/markdig

Here is my .csproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <RootNamespace>Kvyk.Telegraph.Markdown</RootNamespace>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Kvyk.Telegraph" Version="1.0.2" />
    <PackageReference Include="Markdig" Version="0.25.0" />
  </ItemGroup>

</Project>

https://stackoverflow.com/questions/68070423/installed-nuget-throws-system-io-filenotfoundexception

Originally created by @MarkoKvyk on GitHub (Jun 21, 2021). Creating classlibrary and trying to install `Markdig`. [![enter image description here][1]][1] I can use usings in code, but I'm trying to start debugging and it throws it: [![enter image description here][2]][2] link to library. https://github.com/xoofx/markdig Here is my .csproj ``` <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net5.0</TargetFramework> <RootNamespace>Kvyk.Telegraph.Markdown</RootNamespace> </PropertyGroup> <ItemGroup> <PackageReference Include="Kvyk.Telegraph" Version="1.0.2" /> <PackageReference Include="Markdig" Version="0.25.0" /> </ItemGroup> </Project> ``` https://stackoverflow.com/questions/68070423/installed-nuget-throws-system-io-filenotfoundexception [1]: https://i.stack.imgur.com/ovGdr.png [2]: https://i.stack.imgur.com/SpWY5.png
claunia added the question label 2026-01-29 14:37:32 +00:00
Author
Owner

@xoofx commented on GitHub (Jun 21, 2021):

Just tried and it is working on my machine, it's working on the CI and it's working also for many users, with 2000+ download per day, we would get a substantial number of issues like that if Markdig was not working like you describe.

So you might have something wrong on your machine. Maybe try to setup a global.json which restrict to net5.0 SDK and/or remove any superfluous dotnet SDK installed. Try to install a new version of dotnet SDK 5.0. Cleanup maybe your NuGet cache folders...etc. Have you installed a preview version of VS like VS 2022? That could break things like that... but it could be anything, even a global env variable that is messing with msbuild. You can investigate yourself such issues by checking the log of msbuild...etc.

@xoofx commented on GitHub (Jun 21, 2021): Just tried and it is working on my machine, it's working on the CI and it's working also for many users, with 2000+ download per day, we would get a substantial number of issues like that if Markdig was not working like you describe. So you might have something wrong on your machine. Maybe try to setup a global.json which restrict to net5.0 SDK and/or remove any superfluous dotnet SDK installed. Try to install a new version of dotnet SDK 5.0. Cleanup maybe your NuGet cache folders...etc. Have you installed a preview version of VS like VS 2022? That could break things like that... but it could be anything, even a global env variable that is messing with msbuild. You can investigate yourself such issues by checking the log of msbuild...etc.
Author
Owner

@MarkoKvyk commented on GitHub (Jun 23, 2021):

I found the problem. Problem in my Test project. For some reasones it doesnt work well and dont install packages. How to fix it I have no idea. If you had issue like that, please help me. Also you can check it in my repo https://github.com/MarkoKvyk/Telegraph/tree/development
(development branch)

@MarkoKvyk commented on GitHub (Jun 23, 2021): I found the problem. Problem in my Test project. For some reasones it doesnt work well and dont install packages. How to fix it I have no idea. If you had issue like that, please help me. Also you can check it in my repo https://github.com/MarkoKvyk/Telegraph/tree/development (development branch)
Author
Owner

@MarkoKvyk commented on GitHub (Jun 23, 2021):

I found the solution. In my test project were added dublicated references. I`ve created net test project for project I need to test an it works now.

@MarkoKvyk commented on GitHub (Jun 23, 2021): I found the solution. In my test project were added dublicated references. I`ve created net test project for project I need to test an it works now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#470