tyranid / oleviewdotnet

A .net OLE/COM viewer and inspector to merge functionality of OleView and Test Container
GNU General Public License v3.0
1.1k stars 182 forks source link

OleViewDotNet.Main fails to build with Visual Studio 2015 #7

Closed u0m3 closed 6 years ago

u0m3 commented 6 years ago

I came across some errors when compiling OleViewDotNet.Main from main branch commit e454c15bcb27204942f5c8b79f6f282e18c9e825.

1>------ Build started: Project: OleViewDotNet.Main, Configuration: Debug Any CPU ------
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMIELowRightsElevationPolicy.cs(105,51,105,54): error CS1003: Syntax error, ',' expected
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMRegistry.cs(380,48,380,59): error CS1026: ) expected
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMRegistry.cs(380,59,380,60): error CS1002: ; expected
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMRegistry.cs(380,59,380,60): error CS1513: } expected
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMRegistry.cs(804,58,804,63): error CS1003: Syntax error, ',' expected
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMRegistry.cs(995,55,995,56): error CS1003: Syntax error, ',' expected
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMUtilities.cs(675,53,675,56): error CS1525: Invalid expression term 'int'
1>C:\Git\oleviewdotnet\OleViewDotNet.Main\COMUtilities.cs(675,57,675,64): error CS1003: Syntax error, ',' expected
2>------ Build started: Project: OleViewDotNet, Configuration: Debug Any CPU ------
3>------ Build started: Project: OleViewDotNet.PowerShell, Configuration: Debug Any CPU ------
2>CSC : error CS0006: Metadata file 'C:\Git\oleviewdotnet\OleViewDotNet.Main\bin\Debug\OleViewDotNet.Main.dll' could not be found
3>CSC : error CS0006: Metadata file 'C:\Git\oleviewdotnet\OleViewDotNet.Main\bin\Debug\OleViewDotNet.Main.dll' could not be found
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

Apparently my C# version does not like

int.TryParse(parts[0], out int address)

or the likes. Nor does it like

            if (dict is SortedDictionary<S, T> sorted_dict)
            {
                return sorted_dict.Comparer;
            }

complaining _sorteddict does not exist in this context. I'm using Visual Studio 2015 Version 14.0.25431.01 Update 3. Any ideas on what went wrong?

binlmmhc commented 6 years ago

i don't know this problem, but if you just want to use this not learn it's source code, you can download the release version, just in the main page 3 releases

tyranid commented 6 years ago

Basically I'm slowly moving new code to using C# 7 language features which are not supported on VS2015 and will require VS2017. As binlmmhc points out you should be able to download the source code for v1.4 from https://github.com/tyranid/oleviewdotnet/releases/tag/v1.4 (or checkout the tag from the repo) and that should still build in VS2015.