none
How run and build solution visual studio 2017 window on visual for mac

    Question

  • Dear all,

     In my team use mac and window but solution create on window can't build and run on mac contra. now is error run solution window on mac

    CSC: Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll' (CS0041)

    pls help config run and build solution on mac.

    thanks,

    quanvq,


    • Edited by QUANVQ Monday, March 13, 2017 7:33 AM
    Monday, March 13, 2017 7:27 AM

All replies

  • Hi QUANVQ,

    Thanks for posting here.

    I have created a simple project on Windows with Visual Studio 2017 RTM, then build it on the MAC with Visual Studio for Mac, but could not got the same error as you encountered.  Have you installed the Microsoft.Net.Compilers package to your project? If yes, as for workaround for now you can just limit usage of Microsoft.Net.Compilers to Release configuration (edit *.csproj file):

    <Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="'$(Configuration)' == 'Release' And Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />

    Take a look at beginning of condition:

    '$(Configuration)' == 'Release'

    Or you can try to building the project in release configuration.

    If above could not help you, could you please sharing us more detail steps to reproduce this issue? Thanks.


    MSDN Community Support

    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, March 14, 2017 10:29 AM
  • is not run

    my action:

    Open vs on window -> create project -> run project -> ok

    Open vs on mac -> open project -> run project -> error.

    my video error: https://youtu.be/6EkQgvrO0U0

    Thursday, March 16, 2017 5:09 AM
  • @QUANVQ, thanks for your reply.

    According to your video, I follow the steps in the video, but I did not got same error as you, my error is:

    Error building target IncludeRoslynCompilerFilesToItemGroup: Item has already been added. Key in dictionary: 'Link'  Key being added: 'Link'

    Since I could not reproduce the issue, I would like give you a suggestion base on your error.

    I noticed that the error is could not find the reference "System.Web.Entity" and the reference is gray on the References:

    That reference could not be loaded from Mono.framework, to resolve this issue, I got the System.Web.Entity.dll file from my Windows box. I found mine in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\.
    I copied that to the bin folder of my project on my Mac, and updated the reference to include a HintPath:

    <Reference Include="System.Web.Entity" >
      <HintPath>..\bin\System.Web.Entity.dll</HintPath>
    </Reference>

    the reference issue has been resolved, but my Error building target is persist. Hope this has a little

    help for you.

    If this not help you, I suggest you can submit you question to ASP forum, where you could get more support, this forum is to discuss the Microsoft build engine aka MSBuild. Topics including: usage of MSBuild, build customization, and MSBuild extensibility via tasks, loggers and hosting. 


    MSDN Community Support Please remember to click &amp;quot;Mark as Answer&amp;quot; the responses that resolved your issue, and to click &amp;quot;Unmark as Answer&amp;quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 17, 2017 12:35 PM
  • To solve this problem you need to do :

    1. Select project
    2. Right click and select options
    3. Select tab Build -> Compiler
    4. Debug information -> None

    It solved this error but gives me another one

    "System.IO.FileNotFoundException Could not find file "/Users/.../.../bin\roslyn\csc.exe"


    Tuesday, March 28, 2017 4:20 AM
  • @QUANVQ, glad to know that you have resolved this issue. Please mark your answer which is benefit to other communities who has the same problem.

    >>>"System.IO.FileNotFoundException Could not find file "/Users/.../.../bin\roslyn\csc.exe"

    The Visual Studio for MAC is still a preview. MSBuild on non-Windows is not yet ready to serve such tasks. Below method isn't perfect solution but you can try use it to resolve this error:

    Remove Nuget packages, use the following commands from Nuget Package Console:

    PM> Uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
    PM> Uninstall-package Microsoft.Net.Compilers

    In case those packages be uninstalled, you can review you packages.config file.

    If this issue is persist, I suggest that you can submit a new post for this error so that you can get more attention for this error. 

    Hope this can help you.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 29, 2017 4:27 AM
  • I have downloaded Preview 8 (7.0 build 2845) and get the same error message:

    >>>"System.IO.FileNotFoundException Could not find file "/Users/.../.../bin\roslyn\csc.exe" 

    I assume that the combination of slashes forward and slashes backward is the cause of the problem, because " csc.exe" just lives in that directory on my system. To test my assumption: Does anybody know where that wrongly specified path is set in the build process?  

    As a workaround: remove the complete <system.codecom>-section  from your web.config file:

      <system.codedom>

        <compilers>

       .... 

       </compilers>
      </system.codedom>



    • Edited by F_ampP Monday, April 24, 2017 9:41 PM
    Monday, April 24, 2017 9:31 PM
  • Where should I put this Reference? I have been searching high and low...
    Tuesday, January 23, 2018 7:25 AM