生成后事件

 

 

 1       @echo off & setLocal EnableDELAYedeXpansion
 2       chcp 65001
 3 
 4       set errorCode=0
 5 
 6       set target=$(TargetPath)
 7       set project=$(ProjectPath)
 8 
 9       set sdk=%PROGRAMFILES(x86)%\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.2 Tools
10       set framework=%WINDIR%\Microsoft.NET\Framework\v4.5.2
11       set inlineILCompiler=$(SolutionDir)Tools\InlineILCompiler\InlineILCompiler\bin\$(ConfigurationName)\InlineILCompiler.exe
12       set cscli=$(SolutionDir)Tools\CSCli\bin\$(ConfigurationName)\CSCli.exe
13 
14       IF exist "%sdk%\." (
15       echo OK: The Microsoft Windows SDK was found.
16       ) else (
17       echo FAILED: The Microsoft Windows SDK Dir was not found. Check the following path: "%sdk%"
18       goto EXIT_ERR
19       )
20       IF exist "%framework%\." (
21       echo OK: The .NET Framework Dir was found.
22       ) else (
23       echo FAILED: The Framework-Dir was not found. Check the following path: "%framework%"
24       goto EXIT_ERR
25       )
26       IF exist "%inlineILCompiler%" (
27       echo OK: Found the inline-il-compiler.
28       ) else (
29       echo FAILED: The inline-il-compiler was not found. Check the following path: "%inlineILCompiler%"
30       goto EXIT_ERR
31       )
32       IF exist "%cscli%" (
33       echo OK: Found the cscli-compiler.
34       ) else (
35       echo FAILED: The cscli was not found. Check the following path: "%cscli%"
36       goto EXIT_ERR
37       )
38 
39       if $(ConfigurationName) == Debug (
40       echo Build-Configuration: DEBUG
41       echo    DEBUG=IMPL
42       echo    NO OPTIMIZE
43       set ilasm_args=/DLL /DEBUG=IMPL
44       ) else (
45       if $(ConfigurationName) == Release (
46       echo Build-Configuration: RELEASE
47       echo    NO DEBUG
48       echo    OPTIMIZE
49       set ilasm_args=/DLL /OPTIMIZE
50       ) else (
51       echo FAILED: Invalid Configuration.
52       goto EXIT_ERR
53       )
54       )
55 
56       echo.
57       echo.
58       echo Calling the inline-il-compiler ...
59       call "%inlineILCompiler%"
60 
61       echo.
62       echo.
63       echo Calling CSCli ...
64       call "%cscli%" -file:"$(TargetPath)" -r:"RemoveObjAttribute" -c:"CSCalliAttribute"
65 
66       :EXIT
67       EXIT /B %errorCode%
68 
69       :EXIT_ERR
70       set errorCode=-1
71       goto EXIT

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值