accord-net / framework

Machine learning, computer vision, statistics and general scientific computing for .NET
http://accord-framework.net
GNU Lesser General Public License v2.1
4.46k stars 2k forks source link

Error compiling Accord.Math A namespace cannot directly contain members such as fields or methods #2142

Open DefiniteBears opened 4 years ago

DefiniteBears commented 4 years ago

What would you like to submit? (put an 'x' inside the bracket that applies)

Issue description

I have downloaded Accord.NET 3.8.0 archive from the main website, and are attempting to compile it on Windows using Visual Studio 2017 using the Accord.NET.sln solution.

I have installed the T4 toolbox, Sandcastle Help File Builder, NUnit 3 Test Adapter and VC++ 2015 redistributable as per build instructions.

However I receive the following errors attempting to build Accord.Math.Core and Accord.Math

1>------ Build started: Project: Accord.Math.Core, Configuration: net462 Any CPU ------ 1>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math.Core\Matrix.Elementwise.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 1>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math.Core\Matrix.Comparisons.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>------ Build started: Project: Accord.Math, Configuration: net462 Any CPU ------ 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Distance.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Jagged.Product.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Norm.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Matrix.Comparisons.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Matrix.Product.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Matrix.Conversions.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Matrix.Reduction.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Jagged.Random.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Matrix.Linear.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Vector\Vector.Range.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Vector\Vector.Scale.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Vector\Vector.Interval.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Matrix\Matrix.Random.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods 2>D:\Accord.NET-3.8.0-archive(1)\Sources\Accord.Math\Vector\Vector.Random.Generated.cs(1,1,1,22): error CS0116: A namespace cannot directly contain members such as fields or methods ========== Build: 0 succeeded, 2 failed, 1 up-to-date, 0 skipped ==========

This error only occurs in these two modules.