C# wrapper, can't install

16 views
Skip to first unread message

peter bjerg

unread,
Dec 18, 2024, 3:03:14 AM12/18/24
to coolprop-users
Hi. Tried to download precompiled binaries  and follow instructions.

Get's the following error when doing the command : 
"call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\cvarsall.bat" csc Example.cs platform-independent/*.cs -platform:x64 Example"

ERROR:

C:\CoolProp>call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" csc Example.cs platform-independent/*.cs -platform:x86
[ERROR:vcvarsall.bat] Invalid argument found : csc
[ERROR:vcvarsall.bat] Invalid argument found : Example.cs
[ERROR:vcvarsall.bat] Invalid argument found : platform-independent/*.cs
[ERROR:vcvarsall.bat] Invalid argument found : -platform:x86
[ERROR:vcvarsall.bat] Error in script usage. The correct usage is:
Syntax:
    vcvarsall.bat [arch] [platform_type] [winsdk_version] [-vcvars_ver=vc_version] [-vcvars_spectre_libs=spectre_mode]
where :
    [arch]: x86 | amd64 | x86_amd64 | x86_arm | x86_arm64 | amd64_x86 | amd64_arm | amd64_arm64
    [platform_type]: {empty} | store | uwp
    [winsdk_version] : full Windows 10 SDK number (e.g. 10.0.10240.0) or "8.1" to use the Windows 8.1 SDK.
    [vc_version] : {none} for latest installed VC++ compiler toolset |
                   "14.0" for VC++ 2015 Compiler Toolset |
                   "14.xx" for the latest 14.xx.yyyyy toolset installed (e.g. "14.11") |
                   "14.xx.yyyyy" for a specific full version number (e.g. "14.11.25503")
    [spectre_mode] : {none} for libraries without spectre mitigations |
                     "spectre" for libraries with spectre mitigations

The store parameter sets environment variables to support Universal Windows Platform application
development and is an alias for 'uwp'.

For example:
    vcvarsall.bat x86_amd64
    vcvarsall.bat x86_amd64 10.0.10240.0
    vcvarsall.bat x86_arm uwp 10.0.10240.0
    vcvarsall.bat x86_arm onecore 10.0.10240.0 -vcvars_ver=14.0
    vcvarsall.bat x64 8.1
    vcvarsall.bat x64 store 8.1

Please make sure either Visual Studio or C++ Build SKU is installed.

C:\CoolProp>

I'm quite new to C#, but have used Coolprop extensively in MatLab.

Any help would be appreciated!

best regards Peter

Ian Bell

unread,
Dec 19, 2024, 12:34:21 PM12/19/24
to coolpro...@googlegroups.com
In a shell, try running the statements one at a time. This seems like you didn't run vcvarsall properly in the first step as it requires an arch flag

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/coolprop-users/944912b9-4939-4feb-a0b3-13b08ac0768an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages