Comments (8)
My bad. It does seem to work. I guess when it updated my nuget reference, there was a lingering nuget .targets file which looked to be referencing the previous version of SimpleStubs. Probably something to do with my recent upgrade to VS 2017, who knows... Thanks!
from simplestubs.
Hi @Portikus,
Thanks for reporting this issue! Should be a quick fix.
from simplestubs.
The issue has been resolved in master. I will publish the fix with the next NuGet.
from simplestubs.
Hi! When can we expect the updated nuget with this fix? This bug is a blocker for me. Thanks!
from simplestubs.
Sorry for the delay. I will publish the NuGet this week.
from simplestubs.
Just released 2.3.4 which fixes this issue. Please reopen if you have any problems.
from simplestubs.
I am still seeing the same issue with the 2.3.4 release. Can someone please verify? Here is my test interface and the generated stub that fails to build:
public interface ISomeInterface
{
event EventHandler<IEnumerable<string>> SomeEvent;
}
This fails with "Argument 2: cannot convert from 'System.Collections.IEnumerable' to 'System.Collections.Generic.IEnumerable'":
[CompilerGenerated]
public class StubISomeInterface : ISomeInterface
{
private readonly StubContainer<StubISomeInterface> _stubs = new StubContainer<StubISomeInterface>();
public event global::System.EventHandler<global::System.Collections.Generic.IEnumerable<string>> SomeEvent;
protected void On_SomeEvent(object sender, IEnumerable args)
{
global::System.EventHandler<global::System.Collections.Generic.IEnumerable<string>> handler = SomeEvent;
if (handler != null) { handler(sender, args); }
}
public void SomeEvent_Raise(object sender, IEnumerable args)
{
On_SomeEvent(sender, args);
}
}
from simplestubs.
I just created a class library and installed 2.3.4 to it.
I am getting:
[CompilerGenerated]
public class StubISomeInterface : ISomeInterface
{
private readonly StubContainer<StubISomeInterface> _stubs = new StubContainer<StubISomeInterface>();
public MockBehavior MockBehavior { get; set; }
public event global::System.EventHandler<global::System.Collections.Generic.IEnumerable<string>> SomeEvent;
protected void On_SomeEvent(object sender, global::System.Collections.Generic.IEnumerable<string> args)
{
global::System.EventHandler<global::System.Collections.Generic.IEnumerable<string>> handler = SomeEvent;
if (handler != null) { handler(sender, args); }
}
public void SomeEvent_Raise(object sender, global::System.Collections.Generic.IEnumerable<string> args)
{
On_SomeEvent(sender, args);
}
public StubISomeInterface(MockBehavior mockBehavior = MockBehavior.Loose)
{
MockBehavior = mockBehavior;
}
}
from simplestubs.
Related Issues (20)
- Latest version does not compile when test project has x64-only project reference HOT 9
- Error Code 9009 when compiling HOT 2
- Don't publish MSBuild assemblies in the NuGet package HOT 25
- What should I do if I want to mock an object ? Order of Execution ? HOT 3
- SimpleStubs causes Visual Studio to freeze HOT 5
- SimpleStubs not generating stubs with generic Enum constraints correctly HOT 2
- Unused using directive when exculding interfaces HOT 3
- Configurable dir for SimpleStubs.generated.cs HOT 14
- No Intellisense for Stubs in VS2017 15.7.6 HOT 3
- Stubs not generated. HOT 2
- Generating stubs fails with ReflectionTypeLoadException: Unable to load one or more of the requested types HOT 15
- Unable to exclude vcxproj file HOT 5
- Upgrade to VS2019 - Stubs not generated HOT 16
- strong named version of dll HOT 6
- Preprocessing directives in namespace definitions not handled correctly HOT 3
- Simplestubs encountered errors when opening the workspace (referenced project platform different from test project) HOT 2
- Intellisense fails in VS 2019 for generated stubs HOT 3
- SimpleStubs fails in VS 2019 v16.7.0 HOT 4
- SimpleStubs fails in VS 2019 v16.7.5 HOT 3
- This repo is missing important files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simplestubs.