help building castle dynamic proxy

杀马特。学长 韩版系。学妹 提交于 2019-12-08 04:55:33

问题


So I pulled the source from https://svn.castleproject.org/svn/castle/DynamicProxy/trunk/

Open it up in vs.net 2008

problems:

  1. vs.net can't open the assembly.cs
  2. assembly signing failed

What am I doing, rather NOT doing?

Update

So I downloaded nant, setup the .bat file in my PATH so it works in cmd prompt.

I ran:

nant default.build

Getting this error:

build failed, \buildscripts\common-project.xml (48,3) invalid element . Unknown task or datatype.

How exactly do I build the dynamicProxy project now?

update This is what I did, see screenshot:

oh and my nant is:

@echo off "E:\dev\tools\nant-bin\nant-0.86-nightly-2009-05-05\bin\Nant.exe" %*

http://img697.imageshack.us/img697/5623/castlebuildscreenshot.png http://img697.imageshack.us/img697/5623/castlebuildscreenshot.png


回答1:


You can read the FM (how to build.txt). :)




回答2:


You need to run the build script first using NAnt (http://nant.sf.net). This will generate the assembly.cs file. Take a look at the .build files in the tree to see what they are doing.

As for the assembly signing failing, check the project settings to get rid of references to CastleKey.snk. It should sign it using DynProxy.snk (in theory).




回答3:


UPDATE:

The issue with NUnit is now fixed. Do a clean check out. I really have no idea why you're getting that error. Which version of NAnt are you using? Make sure you have the latest (earlier do not have support for .NET 3.5)


You should be able to just pull the source from the trunk, and build with nant (I just did that and it worked). Ok, I lied, looks like the reference to NUnit is wrong, so the unit test project will not build correctly:

        BUILD FAILED - 0 non-fatal error(s), 1 warning(s)

        D:\OLD\DynamicProxy\buildscripts\common-project.xml(295,5):
        'nunit-console.exe' failed to start.
            The system cannot find the file specified

        Total time: 1.2 seconds.

BUILD FAILED

Nested build failed. Refer to build log for exact reason.

Total time: 3.4 seconds.

However the important stuff (assemblyinfo generation) will succeed and you should be able to just open Castle.DynamicProxy2-vs2008.sln, fix the reference to the NUnit assembly hit F5 and build the code with no issues.

I just did it on a clean check out, and it worked.

Generally if you're planning to do modifications in DP codebase, it is advised to go to the Castle user group first, and discuss it there.



来源:https://stackoverflow.com/questions/1829776/help-building-castle-dynamic-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!