简体   繁体   English

每次构建源项目时,如何跳过构建所有引用的项目

[英]How can I skip building all referenced projects every time when I build my source project

I have Xamarin.Forms project which has many dependencies of other projects.我有Xamarin.Forms项目,它与其他项目有很多依赖关系。 When I am doing any modification in business logic every time I need to execute/build my project.当我每次需要执行/构建我的项目时对业务逻辑进行任何修改时。

Due to many other projects dependencies it is taking huge time to complete built(10-15 mins) and showing build o/p.由于许多其他项目的依赖关系,它需要花费大量时间来完成构建(10-15 分钟)并显示构建 o/p。

Done building project "Project1.csproj".完成构建项目“Project1.csproj”。

Done building project "Project2.csproj".完成构建项目“Project2.csproj”。

Done building project "Project3.csproj".完成构建项目“Project3.csproj”。

Done building project "Project4.csproj".完成构建项目“Project4.csproj”。

Done building project "Project5.csproj".....完成构建项目“Project5.csproj”.....

If I remove above projects dependencies from source project's .csproj file如果我从源项目的.csproj文件中删除上述项目依赖项

 <ItemGroup>
    <ProjectReference Include="..\..\..\Components\Business\Project1\Project1.csproj" />
    <ProjectReference Include="..\..\..\Components\BusinessUI\Project2\Project2.csproj" />
    <ProjectReference Include="..\..\..\Components\Core\Project3\Project3.csproj" />
    <ProjectReference Include="..\..\..\Components\CoreUI\Project4\Project4.csproj" />
    <ProjectReference Include="..\..\..\Components\Shared\Project4\Project5.csproj" />
 </ItemGroup>

I am getting so many compile time errors我收到很多编译时错误

are you missing an assembly reference?您是否缺少程序集参考?

How can I build my source project without building all dependent projects every time so that I can save my time?如何在不每次都构建所有依赖项目的情况下构建我的源项目,以便节省时间?

How have you referenced those projects?你是如何引用这些项目的? Are the referenced as project files, or their compiled.dll/.exe form?是作为项目文件引用,还是它们的compiled.dll/.exe 形式?

It sounds like those were added as raw Projects/sourcecode.听起来这些是作为原始项目/源代码添加的。 And in that case, of course they have to be compiled.在这种情况下,当然必须编译它们。 It would be like trying to only compile half the sourcecode otherwise.这就像试图只编译一半的源代码一样。

In .NET you can use any .NET.dll or .NET.exe as assembly reference.在 .NET 中,您可以使用任何 .NET.dll 或 .NET.exe 作为程序集参考。 With the .NET internal stuff you always use.dll's.使用 .NET 内部的东西,您总是使用.dll。 But.exe works too.但是.exe 也可以。 You would have to deploy those.dll's/.exe's with the code, but something like copying it to the output directory as a build action should work.您必须使用代码部署那些.dll/.exe,但是像将其复制到 output 目录作为构建操作应该可以工作。 Indeed I never even heard of referencing the raw project, but it might be there somewhere.事实上,我什至从未听说过引用原始项目,但它可能在某个地方。

Internally the .NET.exe is almost identically to a .NET.dll. .NET.exe 在内部与 .NET.dll 几乎相同。 Some bootstrap code and a entry point more, maybe some fringe stuff like COM interop less.一些引导代码和更多入口点,也许像 COM 互操作这样的边缘内容更少。 It is one of those parts where they drew heavy inspiration from Java bytecode - and then made it better.这是他们从 Java 字节码中汲取灵感的部分之一,然后将其做得更好。 So you can just add them as a reference.因此,您可以将它们添加为参考。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 构建我的 c# 项目时,我收到“在未引用的程序集中定义”错误,如何解决? - I am getting “defined in an assembly that is not referenced” errors when building my c# project, how to solve it? 我可以使用 Source Generators 获取引用的项目代码吗? - Can I get referenced projects code using Source Generators? 如何获得项目中未引用的程序集? - How can I get an assembly that isn't referenced in my project? 如何正确地将文件目录包含到我的项目中,以便在部署时可以在代码中正确打包和引用它们? - How do I correctly include a file directory into my project such that they can be packaged and referenced correctly in code when deployed? 如何动态加载项目引用但代码未引用的程序集 - How can I dynamically load assemblies referenced by project, but not referenced in code 每次我想测试我的 android 游戏时,我都必须重新构建和运行吗? - Every time I want to test my android game I have to Build and Run all over again? 每次我构建我的 C# 项目时,Access 数据库都会被重置 - Access database is being reset every time i build my C# project 我如何构建搜索系统以查找项目中需要android权限的所有引用? - How can I build a search system to find all references that require an android permission in my project? 我在使用的MVC程序集版本邮政版本高于我项目引用的版本。 我该如何解决? - I get error on build that mvc assembly version postal is using is higher than referenced by my project. How do I resolve this? 在MSBuild文件中,如何获取引用的项目? - In a MSBuild file how to I get the referenced projects?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM