使用MSBuild构建仅具有类文件而没有主要方法的项目 [英] Building a project with MSBuild which has only class files without a main method

查看:43
本文介绍了使用MSBuild构建仅具有类文件而没有主要方法的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个仅包含.vb文件的项目.它不包括合适的main()方法来检测入口点吗?谁能建议如何为此项目编写脚本?

I have a project which contains only .vb files. It doesn't include a suitable main() method to detect the entry point? Can anyone suggest how to write the script for this project?

推荐答案

只需将其构建为类库即可.

Just build it as a class library.

如果要查看MSBuild中类库的外观,只需在Visual Studio中创建一个新的类库项目并将其保存.基本上,您的MSBuild文件应包含这样的属性:

If you want to see what a class library looks like in MSBuild, just create a new class library project in Visual Studio and save it. Basically, your MSBuild file should include a property like this:

<OutputType>Library</OutputType>

(如果您只想从命令行构建并跳过MSBuild,请使用/target:library 告诉编译器您要构建类库.)

(If you just want to build from the command line and skipping MSBuild, use /target:library to tell the compiler you want to build a class library.)

这篇关于使用MSBuild构建仅具有类文件而没有主要方法的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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