Reputation: 1050
I am getting the following compilation error using .NET Core 1.0:
“The type or namespace name 'DataException' could not be found (are you missing a using directive or an assembly reference?)”, code: CS0246.
{
"name": "Dna.Net.Core",
"version": "1.0.0-*",
"dependencies": {
"Autofac": "4.1.0",
"NETStandard.Library": "1.6.0",
"System.Data.SqlClient": "4.1.0",
"System.Runtime": "4.1.0",
"System.Runtime.Serialization.Formatters": "4.0.0-rc3-24212-01",
"System.Runtime.Serialization.Primitives": "4.1.1"
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
}
}
48 <Compile Include="System\Data\DataException.cs" />
using Dna.Net.Core.Common;
using System.Data;
namespace Dna.Net.Core.Exceptions
{
public partial interface IDataExceptionMessageHandler
{
CustomMessage Execute(DataException exception);
CustomMessage ParseMessage(DataException exception, CustomMessage customMessage);
void LogException(string message);
}
}
Does .NET Core 1.0 support System\Data\DataException.cs?
Upvotes: 3
Views: 423
Reputation: 531
The file is there but it doesn't have DataException class -https://github.com/dotnet/corefx/blob/master/src/System.Data.SqlClient/src/System/Data/DataException.cs
It doesnt support.
Upvotes: 1