为什么这个调用aspnet_compiler不会产生新的.NET程序集? [英] Why does this call to aspnet_compiler not produce new .NET assemblies?

查看:217
本文介绍了为什么这个调用aspnet_compiler不会产生新的.NET程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Visual Studio的precompile将在Azure上部署我的ASP.NET应用程序。我已经添加了以下到我的.csproj文件:

I'm trying to make Visual Studio precompile my ASP.NET application that will be deployed on Azure. I've added the following to my .csproj file:

<Target Name="AfterBuild">
    <Message Text="Starting AspNetCompiler for $(ProjectDir)" Importance="high" />
    <AspNetCompiler
        VirtualPath="/"
        PhysicalPath="$(ProjectDir)"
    />
</Target>

当我问Visual Studio中prepare以下出现在构建输出一个服务包

现在

Now when I ask Visual Studio to prepare a service package the following appears in the build output:

Starting AspNetCompiler for [PathToMyProject]
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p [PathToMyProject]

如果我在任何的看法厂的错误文件错误识别并打破如此清楚的precompilation是perfomed构建。

If I plant an error in any of the view files that error is identified and breaks the build so clearly the precompilation is perfomed.

不过,我没有看到任何新的.NET程序集随时随地的结果。

Yet I don't see any new .NET assemblies anywhere in the results.

如何使ASP.NET编译器创建视图的.NET程序集?

How do I make ASP.NET compiler create the .NET assemblies for the views?

推荐答案

如果您没有指定输出目录,你应该找到这个文件夹中的输出:

If you don't specify an output directory you should find the output in this folder:

C:\\ WINDOWS \\ Microsoft.NET \\框架\\ v4.0.30319 \\临时ASP.NET文件\\ ROOT \\一些随机-ID (试行排序上修改的日期找到最新的目录)。

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\some-random-id (try sorting on the date modified to find the latest directory).

致电时在 aspnet_compiler.exe 您还可以追加输出文件夹的命令:

When calling the aspnet_compiler.exe you can also append an output folder to the command:

aspnet_compiler -v "/" -p "C:\Projects\WebApplication1\WebApplication1" C:\CompileOutput

在这里,你看到的输出在我的C:\\文件夹CompiledOutput

Here you see the output in my C:\CompiledOutput folder

这篇关于为什么这个调用aspnet_compiler不会产生新的.NET程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆