msgraph-training-aspnetmvcapp
msgraph-training-aspnetmvcapp copied to clipboard
Cannot find a part of the path '[...]\Graph Tutorial\graph-tutorial\bin\roslyn\csc.exe'.
I downloaded a fresh copy of the application today from https://developer.microsoft.com/en-us/graph/quick-start. I was warned that I did not have .net 4.7 installed, installed it. The solution loads cleanly, but when I go into debug I get the error "Cannot find a part of the path '[...]\Graph Tutorial\graph-tutorial\bin\roslyn\csc.exe'."
I'm running Visual Studio 2017 15.9.6 on Windows 10.
Running Update-Package -r from the package manager console resolves the error.
Thank you Bill, I had the same problem. Ran OK after that but fails to retrieve anything from the calendar, despite there being one all day event and one meeting. No errors/exceptions, code executes cleanly
i had the same problem opening the project in my new copy of Visual Studio 2019. i resolved it by adding the section to the csproj
<Target Name="CopyRoslynFiles" AfterTargets="AfterBuild" Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'">
<ItemGroup>
<RoslynFiles Include="$(CscToolPath)\*" />
</ItemGroup>
<MakeDir Directories="$(WebProjectOutputDir)\bin\roslyn" />
<Copy SourceFiles="@(RoslynFiles)" DestinationFolder="$(WebProjectOutputDir)\bin\roslyn" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />
</Target>
as suggested in the stackoverflow question here
Thanks for these reports. Did all of you get the project from the quick-start downloader at https://developer.microsoft.com/en-us/graph/quick-start?platform=option-dotnet?
I reproduce these problems with the zip from the downloader. Updating NuGet packages (except for Microsoft.Identity.Client) in the project seems to fix it for me.
Alternatively you can clone this repo and grab the project from the ./Demos/03-add-msgraph folder, copy your PrivateSettings.config file from your original project, and it should work.
We're updating this training for the 3.x version of MSAL. Once that's done I'll update the ZIP in the quick-start downloader.
It appears that this is a bug with they Roslyn compiler being tracked in their repository: https://github.com/dotnet/roslyn/issues/15556.
Folks have reported the following things fixing the error:
- Unload/reload project
- Clean/Rebuild solution
- Upgrade Nuget packages
- Modifying the project file as @tristian2 described
I had the same problem: take the project you want - move it to another place (like desktop) re-open it and it should work