Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98994

VS Code / .NET Core Code not triggered on machine but is triggered on another

$
0
0

I have a very peculiar problem where by some code is being hit/triggered on my MacBook but not being hit/triggered on my iMac. I have removed all the code from the iMac and cloned the repo again but still have the same issue.

The code that is not being triggered is the Validate function of a model that implements the interface IValidatableObject.

public class CompanyViewModel : IValidatableObject
{
    ...
    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
    {
        if (true)
        {
            ...
        }
     }
 }

So if i have a breakpoint on the if (true), then it gets hit on the MacBook but not on the iMac. And it isn't just a debugging issue as i can see from the controller action that the code has not been run, as ModelState.IsValid is true.

I have also compared the 2 project folders, minus the obj and bin folders, the only differences are the .git files which don't have any impact on the running of the application.

If anyone can off any help it would be very much appreciated. The app is running on .NET Core 2.2


Viewing all articles
Browse latest Browse all 98994

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>