build-process

Create MSBuild custom task to modify C# code *before* compile

余生长醉 提交于 2019-12-06 01:06:12
问题 I want to create a custom MSBuild task that changes my .cs files before they are compiled by csc.exe (but, of course, that doesn't modify them in place - I don't want actual source files touched). I am aware of PostSharp and other AOP frameworks for .NET and they are not an option for this particular project, plus I'd like to learn how to do this. What precisely do I have to do to get this to work? Thanks Richard 回答1: Given your restrictions I think you can do the following: Create custom

Can you configure TeamCity “Artifacts” to be checked back into source control?

假如想象 提交于 2019-12-05 23:13:56
I would like to have TeamCity Artifacts be checked back into source control. I have used TFS Integrator before. So I am used to its approach where, through config, it can check in the output builds back into source control. Then when people do a get they will receive these artifacts. Or is there a completely different way of achieving this with TeamCity? The two ways I can think of are VCS Labeling specify a path in your working directory to label and the location relative to the trunk to check it in. jetbrains explains it here /project/trunk/dist=>/project/tags/%system.build.number% from the

Cobertura ant script is missing Log4J classes

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 21:49:14
问题 I tried to get Cobertura running inside my ant script, but I'm stuck right at the beginning. When I try to insert the cobertura taskdef I'm missing the Log4J libraries. Ant properties & classpath <property name="cobertura.dir" location="/full/path/to/cobertura-1.9.3" /> <path id="cobertura.classpath"> <fileset dir="${cobertura.dir}"> <include name="cobertura.jar" /> <include name="lib/**/*.jar" /> </fileset> </path> <taskdef classpathref="cobertura.classpath" resource="tasks.properties" /> My

Is there a way to make the Maven build independent of the network connection?

流过昼夜 提交于 2019-12-05 21:04:28
I'm working in a Continuous Integration environment and part of the automated build process includes the compilation of Maven managed projects. What I want to know is if there is a way to make the Maven build independent of the network connection. Currently we have the all the jar's that we need installed in the repository but the problem is that Maven tries to check for plugins updates and that makes the build fail if, eventually, the connection is down. You can either run offline with the -o switch or by adding <offline>true<offline> to your settings.xml. It's worth pointing out though that

How do you recursively call tasks in MSBuild?

青春壹個敷衍的年華 提交于 2019-12-05 18:30:45
E.g. I want to call these scripts passing diff params each time: <ItemGroup> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\Tables\*.sql" /> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\Functions\*.sql" /> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\Views\*.sql" /> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\ForeignKeys\*.sql" /> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\StoredProcedures\*.sql" />

Is there a way to get Visual Studio to run “Transform All Templates” upon a successful build?

匆匆过客 提交于 2019-12-05 18:23:49
I have a T4 template that geneates helpert code based on other code that is declared within my project. Because of this, I have to build my project before I run "Transform All Templates". Is it possible to have "Transform All Templates" run as a post-build-event upon a successful build? I've not really tried it myself but I think you want to look into this . You should be able to modify your project files to achieve what you want. An easier solution may be to modify your templates A LA the T4 MVC templates so that they automatically mark themselves as dirty on build (check the docs page and

C++ Header files - put them in one directory or merged in a tree structure?

馋奶兔 提交于 2019-12-05 18:03:59
问题 I have a substantial body of source code (OOFILE) which I'm finally putting up on Sourceforge. I need to decide if I should go with a monolithic include directory or keep the header files with the source tree. I want to make this decision before pushing to the svn repo on SourceForge. I expect a lot of people who use it after that move will keep a working copy checked out directly from SF so won't want to change their structure. The full source tree has about 262 files in 25 folders. There

C++ Build Process

痞子三分冷 提交于 2019-12-05 16:50:37
I am currently working on an opensource C++ project. I don't have much experience in C++ as my daily job mainly involves with Java. I am now planning to release my C++ project and I would like to know how should I should I arrange the packaging of my project. E.g, in Java, all the class files are packaged into jar file. So what is the equivalent approach in C++? Is there any good practise for organizing the source code/binary? My target platform is Linux by the way. Another question is I am currently using Eclipse CDT plugin for development and building. So is there anyway that I can extract

ant regex for android package names

放肆的年华 提交于 2019-12-05 16:43:02
in my android project all of my .java view files import the R file based on the name of the current package. When I change the name of my package name in the Android Manifest (dynamically, not refactoring via Eclipse or any other IDE), I need to the references of all my java files to point to the new R file that gets generated I am making a build script via Ant, but I am not sure what the regular expression convention would look like The strings that need to be replaced look like this: import com.mysite.myapp.R; ie. import com.sushiroll.california.R This is what I have in my ant build script

How to add system property equivalent to java -D in Ant

强颜欢笑 提交于 2019-12-05 16:42:09
问题 I need to set java -Djava.library.path=/some/path and I want to do it when I am running my ant script, building my jar. I think I have to use <sysproperty key="java.library.path" value="/some/path"/> but it doesnt work. I cannot make the syntax work. The only thing I have Googled and found is sysproperty in conjunction with <java classname> but that doesnt make any sense to me. I am not sure if this is relevant, but I am using ant to create a ear and deploying this ear in JBoss. 回答1: Here is