Using Mono 2.2.1 and Visual Studio 2010 simultaneo

2019-05-21 04:29发布

I created a C# .NET 3.5 project with Visual Studio 2010, add some classes and forms and close it. After that I open the project with Monodevelop 2.2.1 and add some additional stuff and close ist again. Now when I reopen the project with Visual Studio 2010, the project conversion manager pops up and wants to convert the project. I analysed the project files and the differences are only the following two lines:

Visual Studio 2010:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
...
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
...

Monodevelop 2.2.1:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
...
    (missing)
...

Do you have any suggestions how to avoid this? Like how to tweak Monodevelop to write the project files Visual Studio wants to read or disable the conversion agent or converting silently in the background.

And please no complaints about the tool chain ;) It must be like that.

3条回答
做自己的国王
2楼-- · 2019-05-21 05:05

I have been used to such issues for a long time. My rule of thumb is to make all project level changes (that will modify csproj files) in Visual Studio, while file level changes can be made in both MonoDevelop and Visual Studio without a problem.

It seems that MonoDevelop does not make use of MSBuild script in a way compatible to Visual Studio.

You may try out its latest build, but I don't think it will change much in a short period of time.

查看更多
Explosion°爆炸
3楼-- · 2019-05-21 05:10

Use MonoTools for Visual Studio, which lets you run and debug your app on Mono (instead of .NET) under Visual Studio.

The extension is for VS2010, but can easily be added to VS2012.

Note that MonoTools appears to have been deprecated, but it works fine with VS2010 and VS2012 without resorting to another IDE. It's the easiest way to run your VS projects under Mono, and provides a great debugger interface for testing on Linux and OSX without leaving Windows.

查看更多
狗以群分
4楼-- · 2019-05-21 05:18

I recommend you try MonoDevelop 2.4. MonoDevelop 2.2 predates VS 2010.

查看更多
登录 后发表回答