Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build: The function "GetType" on type "System.String" is not available #17

Open
PypeBros opened this issue Feb 12, 2024 · 7 comments

Comments

@PypeBros
Copy link

@cgeshan
Copy link

cgeshan commented Mar 18, 2024

Were you able to find a work-around or solution to this issue? I am facing the same

@PypeBros
Copy link
Author

only if you consider re-creating a VS studio project & solution from scratch using the source files a workaround ...

@MrDavid949
Copy link

Try using this fork which has many updates to allow building with VS2022:
https://github.com/MrDavid949/NetworkDirect

@mcleantom
Copy link

@MrDavid949 Hey, I tried to run msbuild from the src folder of that but its saying I need MFC libraries:

MSBuild version 17.11.9+a69bbaaf5 for .NET Framework
Build started 01/11/2024 12:02:35.

Project "C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln" on node 1 (d
efault targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|x64".
Project "C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln" (1) is build
ing "C:\Users\tom.mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj" (2) on n
ode 1 (default targets).
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v
170\Microsoft.CppBuild.targets(497,5): error MSB8041: MFC libraries are requir
ed for this project. Install them from the Visual Studio installer (Individual
 Components tab) for any toolsets and architectures being used. [C:\Users\tom.
mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj]
Done Building Project "C:\Users\tom.mclean\src\NetworkDirect\src\ndutil\ndutil
.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln
" (default targets) -- FAILED.


Build FAILED.

"C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln" (default target) (1)
 ->
"C:\Users\tom.mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj" (default tar
get) (2) ->
(PrepareForBuild target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC
\v170\Microsoft.CppBuild.targets(497,5): error MSB8041: MFC libraries are requ
ired for this project. Install them from the Visual Studio installer (Individu
al Components tab) for any toolsets and architectures being used. [C:\Users\to
m.mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.89

However I have selected those libraries in the visual studio installer:

Image

any ideas how to fix this? Thanks :)

@MrDavid949
Copy link

MrDavid949 commented Nov 2, 2024

Roll down to the bottom and make sure you also have this:
Image

@mcleantom
Copy link

mcleantom commented Nov 3, 2024

Thanks for the reply, I've installed those libraries now:
Image
(And uninstalled all the other MFC libraries) but I am still getting the same errors:

C:\Users\tom.mclean\src\NetworkDirect\src>msbuild
MSBuild version 17.11.9+a69bbaaf5 for .NET Framework
Build started 03/11/2024 18:45:30.

Project "C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln" on node 1 (d
efault targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|x64".
Project "C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln" (1) is build
ing "C:\Users\tom.mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj" (2) on n
ode 1 (default targets).
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v
170\Microsoft.CppBuild.targets(497,5): error MSB8041: MFC libraries are requir
ed for this project. Install them from the Visual Studio installer (Individual
 Components tab) for any toolsets and architectures being used. [C:\Users\tom.
mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj]
Done Building Project "C:\Users\tom.mclean\src\NetworkDirect\src\ndutil\ndutil
.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln
" (default targets) -- FAILED.


Build FAILED.

"C:\Users\tom.mclean\src\NetworkDirect\src\netdirect.sln" (default target) (1)
 ->
"C:\Users\tom.mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj" (default tar
get) (2) ->
(PrepareForBuild target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC
\v170\Microsoft.CppBuild.targets(497,5): error MSB8041: MFC libraries are requ
ired for this project. Install them from the Visual Studio installer (Individu
al Components tab) for any toolsets and architectures being used. [C:\Users\to
m.mclean\src\NetworkDirect\src\ndutil\ndutil.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.30

Any ideas?

Edit:
It seems like I am missing this folder:

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\atlmfc\lib\x64

Image

I am not sure why it is not there when I have pressed to install MFC

@MrDavid949
Copy link

Did you get it to build? You should have this:
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants