Giter VIP home page Giter VIP logo

build-by-signature's People

Contributors

gusarov avatar

Watchers

 avatar  avatar

Forkers

damnlogin

build-by-signature's Issues

Enabled Bss after diabled period

What steps will reproduce the problem?
1. Enable and build Utils
2. Disable
3. Modify and build Utils
4. Enable and build dependent project

That should lead to inconsistent dll state...

If bss file is inconsistent - update it during incremental build also (not only 
after CopyFilesToOutputDirectory step)

Original issue reported on code.google.com by [email protected] on 28 May 2012 at 11:07

Kevin's workaround for VS host-compiler cache

I ran into a similar issue the other day. As far as I can tell, when changes 
are made to a source code file on-disk during the build process, Visual Studio 
doesn't seem to pick up the changes until the next build.

In other words, if I manually modify something in the generated source code 
file to introduce an error, and then attempt to build, that error will be 
reported even though the file is regenerated before the compiler was actually 
invoked. However, if I then build again, it will see the regenerated content 
and build successfully. (My generator doesn't change the generated source code 
file at all during this second build, since it is already up-to-date.)



There are two workarounds to this that I have been able to find:

1) As you mentioned, setting the UseHostCompilerIfAvailable property to false 
causes MSBuild to not use the in-process compiler, which bypasses the issue. 
Unfortunately, as you also noted, not using the in-process compiler hurts build 
performance. 


2) The IVsMSBuildTaskFileManager host object can be used to directly modify 
VS's in-memory cache of the generated source code file, allowing it to "see" 
the changes immediately during the build process. I can post some code that 
shows you how to do this if you'd like.



The drawback to the second approach is that (as far as I have been able to 
determine) your Target and Task need to be registered with each project type 
(e.g. C#, VB, etc.) that will need to use them in order to tell the project 
system to pass in an instance of that interface as the Task's HostObject. In my 
case, this really complicates installation, since now my installer not only 
needs to find every installed variation of VS to register the targets file as a 
"SafeImport," it also needs to find every project type with which my extensions 
may be used in order to register the appropriate Target/Task pairs. Plus, 
anyone who wants to use the Task in another Target will need to go and register 
that pair themselves.

(To see where this registration is performed, search for "MSBuildHostObjects" 
in the VS registry under the "Projects" registry key. The format of the subkey 
names seems to be "TargetName;TaskName".)

Original issue reported on code.google.com by [email protected] on 23 Oct 2012 at 9:44

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.