Hi,

I used the archetype to create a _simple_ demo:
mvn archetype:create -DgroupId=net.wessendorf.dotnet
-DartifactId=npanday.demo
-DarchetypeArtifactId=maven-archetype-dotnet-simple
-DarchetypeGroupId=org.apache.npanday
-DarchetypeVersion=1.4.0-incubating

This works great, so far. However the archetype is a bit simple - and
I changed it slightly, as I want to unit test "internal" (or non
public) classes.

The project is (currently) located here:
https://github.com/matzew/npanday-demo

Doing "mvn clean install" gives me this (expected) error:

INFO] 
/Users/matzew/Work/github/npanday-projects/pusher/target/build-test-sources/Sample/MyAppTest.cs(35,12):
error CS0122: `Sample.MyApp' is inaccessible due to its protection
level
[INFO] /Users/matzew/Work/github/npanday-projects/pusher/target/npanday.demo.dll
(Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR

I found that this can be solved by adding the following information to
the AssemblyInfo.cs file:

     [assembly: InternalsVisibleTo("Sample")]

Since it seems I am not able to generate an AssemblyInfo.cs ([1]), I
created one by hand:
https://github.com/matzew/npanday-demo/blob/master/Properties/AssemblyInfo.cs


Now I am still getting the "is inaccessible due to its protection level" error.

I am on Mac/Mono (2.6.7) and I wondering weather NPanday (or Mono?) is
ignoring the "InternalsVisibleTo" information in my AssemblyInfo.cs
file.

Or.... am I just running into a "user error"? Perhaps some additional
configuration is needed?

Thanks in advance!
-Matthias

[1] https://issues.apache.org/jira/browse/NPANDAY-453


-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Reply via email to