Hi Henry,
I have compiled the following files in a single .NET assembly (which is not
the same as a single file as you know that a .NET assembly is a logical
grouping of .NET modules):
csc /t:module /out:Proj1_CSharp.net Proj1_CSharp.cs
cl -clr -LN Proj2_MCPP.cpp
csc /t:module /addmodule:Proj1_CSharp.net /addmodule:Proj2_MCPP.netmodule
Proj3_CSharp.cs
al /out:single.dll /platform:x86 Proj1_CSharp.net Proj2_MCPP.netmodule
Proj3_CSharp.netmodule
Proj3_CSharp.cs:
public class Proj3_CSharp
{
public void f(Proj2_MCPP x, Proj1_CSharp y)
{
}
}
Proj2_MCPP.cpp:
#using "Proj1_CSharp.net"
public ref class Proj2_MCPP
{
public:
void g(Proj1_CSharp x) {}
};
Proj1_CSharp.cs:
public class Proj1_CSharp
{
public void h(){}
}
single.dll is a manifest-only file of a .NET assembly with 3 .NET modules
Proj1_CSharp.net, Proj2_MCPP.netmodule and Proj3_CSharp.netmodule.
Depending on what you have in the C++ code -most likely- you will need a
manifest file for the .EXE consuming types defined in the
Proj2_MCPP.netmodule.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.