Search code examples
visual-studiocsprojvisual-studio-mac

What is the XspParameters element that Visual Studio for Mac adds to a .csproj file?


My team has an ASP.NET project that was originally created in Visual Studio on Windows, and has only ever been developed in that environment up to this point. Today, I opened that project for the first time in Visual Studio for Mac (version 7.6 build 711), and added a new file to the project.

After doing that, while looking at the diff on the pull request, my team noticed this new addition to the .csproj file, evidently made by Visual Studio for Mac:

<MonoDevelop>
    <Properties>
        <XspParameters Port="8080" Address="127.0.0.1" SslMode="None" SslProtocol="Default" KeyType="None" CertFile="" KeyFile="" PasswordOptions="None" Password="" Verbose="True" />
    </Properties>
</MonoDevelop>

What is this? What does it do?

Should we manually remove it, given that the application will continue to only ever be hosted in Windows environments?

(I suspect it is probably harmless? On the other hand, I'd like to understand what it is before putting a project built with that element present into production; I'm leery about the Passsword="", for example, potentially manifesting some kind of security hole.)


Solution

  • These are just the settings that are used when running the ASP.NET project with Mono's ASP.NET hosting server (XSP). You can remove these properties.

    Testing this and it seems that these properties are added to the project if you open the Project Options dialog and then click the OK button. Ideally if the values match the defaults then this should not be added to the project file.

    It would probably make sense for Visual Studio for Mac to store this information in the same way as run configurations are in the .user file instead of adding it to the main project.