✅ .net trying to find non-existent cs files
Error IDE1100 Error reading content of source file 'D:\Dev\C++\Test\TestCS\obj\Debug\net6.0\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs' -- 'Could not find file 'D:\Dev\C++\Test\TestCS\obj\Debug\net6.0\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs'.'. AndromedaCS D:\Dev\C++\Test\TestCS\obj\Debug\net6.0\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs 1 Active
I am getting this error though my build directory is outside of the TestCS project. I am building it as a dll and it keeps trying to find AssemblyAttributes.cs and AssemblyInfo.cs and GlobalUsings.cs etc and I don't know why. I am using 4.7.2.32 Replies
C# isnt C++ FYI
Show us your projects folder
oh i know
i was trying to use c++ and c# using mono
wdym
what does this mean? you don't need mono to do C++ interop in C#
yeah but I didn't want to use pinvoke
what's your other option, C++/CLI?
yeah
using mono
which is no longer supported in newer versions of .NET afaik
i want to call a c++ function from c#
just use pinvoke imo
you're overcomplicating it
https://www.youtube.com/watch?v=J7sWEsVVaAA&t=6874s&ab_channel=ChernoUnplugged
but here he does it and it works?
Cherno Unplugged
YouTube
Calling C++ from C# // Game Engine series
Stream ► https://twitch.tv/thecherno
Support the series and Hazel! ► https://patreon.com/thecherno
Main Channel ► https://youtube.com/thechernoproject
Code ► https://github.com/TheCherno/Hazel
Peter's Mono Guide ► https://peter1745.github.io/
CHAPTERS
#Hazel #GameEngineSeries
i want to use mono i don't want to use pinvoke
are we missing context? are you trying to execute C# code from a C++ entry point?
this
I am using 4.7.2.
also doesn't match up with .NETCoreApp,Version=v6.0
yeah ik
and i don't know why
why don't you want to use pinvoke?
i just don't want to?
whatever you're trying to do instead seems way more complicated
so if you don't have a good reason to not use it, my recommendation is just use it
pinvoke uses c and i don't have any c code
pinvoke does not "use c"
i have to have an
extern "c"
mono and pinvoke are completely unrealted
to access anything
yeah i know
i don't think you even need to export the functions like that, you'd just have to deal with name mangling on the C# side
You seemingly are wanting to host the .net runtime from within C++
so how do I solve my problem?
Show me your folder where your csproj is
D:\Dev\C++\Test\TestCS
whats inside Test
@youdontknowwhoiam What's your current VS version?
2022
and the content of the .csproj file?
when I deleted the csproj file and generated it again it worked
i tried this before and it didn't work but it works now