Vsxmd icon indicating copy to clipboard operation
Vsxmd copied to clipboard

Working fine for a project in one machine, but not in other machine

Open EuroEager2008 opened this issue 1 year ago • 2 comments

Nuget added to a project, compiles and generates .md file just fine on my office machine. Cloned the repo to my home machine which reports an error while build. Error message (replaced some private info into <> brackets): Error MSB3073 The command ""C:\Users<username>.nuget\packages\vsxmd\1.4.5\build/../tools/win-x64/Vsxmd.exe" "bin\Debug\net6.0<projectname>.xml" "\README.md" """ exited with code -2147450726. (plus a line number in the Vsxmd.targets file stating <Exec Command="$(VsxmdCommand)" />)

Since this is machine specific it cannot be anything wrong with the solution files, but something missing on my homemachine?

EuroEager2008 avatar Sep 18 '23 12:09 EuroEager2008

Same problem for me. It worked, then suddenly all my projects containing Vsxmd started to get this error.

I use the latest version of VS2022 Community and my projects are in .NET 7.0 (last update).

ebiton-eig avatar Oct 02 '23 14:10 ebiton-eig

Possibly a problem with temporary directory where Vsxmd stores data, but it does not clear it correctly on rare occasions - probably a bug.

We solved similar problem with extending end-project csproj with:

    <!--
      FIXES:
      An assembly specified in the application dependencies manifest (Vsxmd.deps.json) was not found:
      package: 'runtimepack.Microsoft.NETCore.App.Runtime.win-x64', version: '3.1.1'
      path: 'Microsoft.Win32.Primitives.dll'
    -->
    <PropertyGroup>
      <UserTempFolder>$([System.IO.Path]::GetTempPath())</UserTempFolder>
    </PropertyGroup>
    <ItemGroup>
      <FilesToDelete Include="$(UserTempFolder).net\Vsxmd\**\*"/>
    </ItemGroup>
    <Target Name="CustomCleanVsxmd" AfterTargets="Clean" Condition="$([MSBuild]::IsOsPlatform('Windows'))" >
      <Message Importance="high" Text="Cleaning up Vsxmd temporary files in $(UserTempFolder).net\Vsxmd" />
      <Delete Files="@(FilesToDelete)" ContinueOnError="true" />
      <RemoveDir Directories="$(UserTempFolder).net\Vsxmd\" ContinueOnError="true" />
    </Target>

fr4gles avatar Jan 15 '24 11:01 fr4gles