Xamarin Studio build event issue
来源:互联网 发布:游戏开发用什么软件 编辑:程序博客网 时间:2024/05/01 09:08
參閲:http://www.mono-project.com/archived/porting_msbuild_projects_to_xbuild/
Pre/PostBuildEvents
These events contain shell commands to be run before or after a build. They are executed using the shell, cmd.exe on Windows and typically sh on Unix. Shell command for Windows won’t run on Linux or Mac, but to solve this, you could add more conditional Pre/PostBuildEvents, like:
<PreBuildEvent Condition=" '$(OS)' == 'Unix' ">cp foo.txt $(OutDir)/foo.txt</PreBuildEvent> <PreBuildEvent Condition=" '$(OS)' != 'Unix' ">copy foo.txt $(OutDir)\foo.txt</PreBuildEvent>
The condition could be based on the Configuration also, for example you could create a new “Unix” configuration.
Another, way of doing this could be to use the Before/AfterBuild targets, with which you can use the built-in tasks, like “Copy”, “MakeDir” etc, so no problem with portability. Eg:
<Target Name="BeforeBuild"> <Copy SourceFiles="foo.txt" DestinationFolder="$(OutDir)" /> </Target>
For commands that have no corresponding tasks available and you don’t want to write a custom task for them, you can use the ‘Exec’ task, which invokes the specified ‘Command’ using the shell.
<Target Name="AfterBuild"> <Exec Command="foo.exe arg1 arg2" Condition=" '$(OS)' == 'Windows_NT' " /> </Target>
- Xamarin Studio build event issue
- Visual Studio build event command line 使用方法
- Visual Studio build event command line 使用方法
- Visual Studio 的Build Event 使用
- Xamarin Studio
- Xamarin Studio
- Post Build Event for CxxTest in Visual Studio 2005
- Visual Studio 在Post build Event 调用 signtool
- 关于Post Build Event
- build event command line
- build event command line
- [Issue] 在MAC 环境无法安裝Xamarin
- Xamarin Studio开发Android应用
- Xamarin Studio 折叠代码设置
- Xamarin提示Build-tools版本过老
- Xamarin提示Build-tools版本过老
- Xamarin.iOS + VSTS + OSX Build Agent
- Post-Build Event command line
- javascript基础(this,工厂方法来创建对象,构造函数创建对象)(十六)
- Celery内存泄露问题分析
- ASP中冒号: 和 下划线_ 的作用
- STM32串口第一个字节丢失解决办法
- Linux Platform驱动模型(二) _驱动方法
- Xamarin Studio build event issue
- IO流_FileOutputStream写出数据加入异常处理
- 全排列Permutations
- response.setContentType()中MIME参数类型总结
- 万亿级数据洪峰下的分布式消息引擎
- mysql存储过程和触发器 --- 一次很有意思的尝试
- P1048 采药
- 通过SQL Server命令行启动及停止SQL服务的方法
- JVM(java 虚拟机)内存设置