zoukankan      html  css  js  c++  java
  • 利用bat编译WPF项目

    1.      1. 新建一个解决方案,里面包含一个WPF项目(WPFApp)和Dll项目(CSharpLibrary),WPF项目添加对Dll的引用。

    2.     2.  打开BuildàConfiguration Manager 对话框,  Active Solution Configuration :Release

      Active solution platform x86,把两个项目的build 选项全部勾选。

       Active solution platform 下拉框选择New,弹出如下对话框,选择X64,点击OK,把两个项目的build 选项全部勾选。 

    3.       3. 修改WPF项目属性.打开项目属性,选择build

    Configuration Release

    Platform: x64 , Platform TargetX64 ,Output Path:  ..\x64\Release\

    Platform: x86 , Platform TargetX86 ,output Path: ..\Release\

    不要选择Any CPU

    4.       4. 修改dll项目。

    Configuration Release

    Platform: x64 , Platform TargetX64 ,Output Path:  ..\x64\Release\

    Platform:  Any CPU , Platform TargetX86 ,output Path: ..\Release\

    这里没有X86,只能选Any CPU

    5.       5. Build_All.Bat文件:

    if "%1"== "" goto error

    if "%2"== "" goto error

     

    set CONFIG=%1

    set PLATFORM=%2

     

    echo Building , please wait a minute...

     "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" BatComplineSolution.sln /t:Rebuild /p:Configuration=%CONFIG%;Platform=%PLATFORM% >build.log

    echo Building BatComplineSolution.sln Complete!

    goto end

     

    error:

    echo error:para is invalid.

     

    :end

    Pause

     

    6.       build Release x64.bat:

    build_All.bat Release x64

     

    7.       build Release x86.bat:

    build_All.bat Release x86

     

     

     

     

  • 相关阅读:
    C#设计模式(2)——简单工厂模式
    C#设计模式(1)——单例模式
    静态变量与静态方法
    在服务器操作系统上使用TeamViewer
    51 nod 1439 互质对(Moblus容斥)
    51 nod 1495 中国好区间
    51nod 1103 N的倍数(抽屉原理)
    51 nod 1427 文明 (并查集 + 树的直径)
    51nod 1486 大大走格子(容斥原理)
    hihocoder 1388 fft循环矩阵
  • 原文地址:https://www.cnblogs.com/xiaokang088/p/2117036.html
Copyright © 2011-2022 走看看