diff --git a/.gitignore b/.gitignore index a73fe987ba3c1..dd44eb6d846c1 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ onnxruntime_profile*.json /docs/python/examples/*.onnx /docs/python/examples/graph.* /docs/python/*_LICENSE +/csharp/**/obj/ +/csharp/**/bin/ diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs b/csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs index 3b25d16e9dbd4..e185cb6796cec 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs @@ -113,8 +113,8 @@ private void ThrowWrongInputName() var container = new List(); container.Add(NamedOnnxValue.CreateFromTensor("wrong_name", tensor)); var ex = Assert.Throws(() => session.Run(container)); - Assert.Equal("[ErrorCode:InvalidArgument] Missing required inputs: data_0 ", ex.Message); - session.Dispose(); + Assert.Equal("[ErrorCode:InvalidArgument] Missing required inputs: data_0", ex.Message); + session.Dispose(); } [Fact] @@ -179,7 +179,7 @@ private void ThrowExtraInputs() container.Add(nov1); container.Add(nov2); var ex = Assert.Throws(() => session.Run(container)); - Assert.Equal("[ErrorCode:InvalidArgument] Invalid Feed Input Names: extra. Valid input names are: data_0 ", ex.Message); + Assert.StartsWith("[ErrorCode:InvalidArgument] Invalid Feed Input Names: extra. Valid input names are: ", ex.Message); session.Dispose(); }