Visual Studio for mac從入門到放棄1


MAC 

第一步:從微軟官網下載:https://www.visualstudio.com/vs/visual-studio-mac/

第二步:安裝軟件過程出現

It was not possible to complete an automatic installation. This might be due to a problem with your network, proxy servers or an unsolvable installation conflict. At this point, you can continue the installation by manually downloading and installing the independent pieces. The list below shows each component that you need to install.
Mono Framework

Download the Mono Framework v4.8.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.

Java SDK
Mac OS X uses its own version of Java and in order to install it you need to  start the terminal app and type the following command: javac -versionAfter typing it you should see a Mac OS X system popup which will guide you to install the Java software.
Android SDK

Download the Android SDK for Mac OS X version 24.4.1, open the downloaded archive and copy the contents of the folder found at its root directory (most probably named android-sdk-macosx) to the /Users/cong/Library/Developer/Xamarin/android-sdk-macosx directory.

Click here in order to start the Android SDK Manager application. In the GUI make sure the following components are installed or selected for installation:

  • Android SDK Tools
  • Android SDK Platform-tools
  • Android SDK Build-tools
  • Android API 15
  • Android API 19
  • Android API 21

 

Once all the required components are selected (you can select others as well, if you wish) start the installation.If you cannot see /Users/cong/Library/Developer/Xamarin/android-sdk-macosx in Finder please click here to reveal the directory in Finder.

Download the Android NDK for Mac OS X version r10e, open the downloaded archive and copy the contents of its root directory (most probably named android-ndk-r10e) to the /Users/cong/Library/Developer/Xamarin/android-ndk directory.

When the Android SDK installation is finished you might want to start the Android Emulator Manager and create as many emulator images as you might need for your development. This step can be performed at any time, on an as-needed basis.

Visual Studio for Mac Preview

Download the Visual Studio for Mac Preview v7.0.0 archive to any directory on your disk, double-click it and then drag and drop the Visual Studio for Mac Preview icon to the Applications folder.

Xamarin.Android

Download the Xamarin.Android v7.1.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.

Xamarin.iOS

Download the Xamarin.iOS v10.4.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.

Xamarin.Mac

Download the Xamarin.Mac v3.0.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.

(這里沒有用到移動端只需要下載:Mono Framework v4.8.0 archive  Visual Studio for Mac Preview v7.0.0 archive 這2個包就可以,其他都是開發跨平台包)

三、激動人性時刻到來,打開vs,界面非常簡潔,去除vs很多冗余功能,感覺舒服很多。。。。

 

 

四、新建一個mvc項目,會提示你要在線安裝支持mvc類庫,是從nuget下載dll??

五 運行 微軟66666

 

Windows

如果將上面代碼放到windows系統,結果會怎么樣呢?

環境:win10+vs2015 編譯正常,運行也正常

 

上面那些只是小試牛刀,下面是見證奇跡時候,直接把之前項目【不連接數據庫】丟到mac vs運行

居然報錯,徹底把我驚呆了Operation is not supported on this platform. 這個操作不支持此平台。。。這個是預覽版上bug?

對於出現問題,可以用以下幾種方案

1:重啟vs,重啟電腦,卸載項目重新加載(成功一次,后來不知道為啥不行。。。)

2:so上面有人說是debug模式問題,我切換編譯還是報錯。(失敗)

3:google一下說多了pdb文件,我清理一下整個解決方案,把所有bin目錄刪除,編譯還是報錯。。。(失敗)

4:切換目標框架   (成功一次,之后失敗就沒法成功過了)

 

 

會不會是Mono4.5沒有全部移植過來類庫?於是這個設置一下4.5.1 4.5.2,我在windows是net4.5,編譯一下,依然報錯。 我切換4.6.1一下編譯 成功了。。。。

(然而我高興太早了,准備想重現這個問題操作,備份一下csproj文件,還原之前舊版本csproj,然后一路報錯下去解決不了,把正確csproj替換也不行)

5:mac上新建一個mvc項目,把代碼拷貝過去(如果所有方法試過都不行,此方案是百試百靈,強烈推薦)

6:我舊項目對比一下5新建項目csproj,改了一摸一樣也不行,fk(失敗,不知道為啥)

 

本人在項目采用第5個方案,Sorry,時間有限,暫時分析不出報錯原因具體在哪里...

 

最后想說:vs在mac操作加入【未包括項目文件】很蛋疼。。

 

測試Demo:http://files.cnblogs.com/files/walleyekneel/VSForMacTest.zip

 

2 vs mac-工具體驗吐槽

3 vs mac-加入數據庫訪問項目

4 vs mac-ios開發

5 vs mac-安卓開發

6 vs mac netcore體驗


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM