Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find a part of the path '[...]\Graph Tutorial\graph-tutorial\bin\roslyn\csc.exe'. #19

Open
BillStrait opened this issue Mar 18, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@BillStrait
Copy link

BillStrait commented Mar 18, 2019

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.

@BillStrait
Copy link
Author

Running Update-Package -r from the package manager console resolves the error.

@waysidefarm
Copy link

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

@tristian2
Copy link

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

@jasonjoh jasonjoh self-assigned this May 1, 2019
@jasonjoh jasonjoh added the bug Something isn't working label May 1, 2019
@jasonjoh
Copy link
Member

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.

@jasonjoh
Copy link
Member

It appears that this is a bug with they Roslyn compiler being tracked in their repository: dotnet/roslyn#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

@Hoopou
Copy link

Hoopou commented Jul 5, 2019

I had the same problem: take the project you want - move it to another place (like desktop) re-open it and it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants