Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

JerikTelorian posted:

I've got a complicated question (at least, it seems complicated). I'm working in C# and Unity.

I'd like to create a UI element that displays some information from a class. For example, a text element that prints the HP of mob. I'd also like that UI element to change the information it prints -- maybe you want it to display the MP instead of HP, or the level, and to make this change while the software is running.



Maybe put a better way: is there a way, at runtime, to identify the properties exposed by a class? Is there a way for me to show the player, while the game is running, that gameClass has HP, MP, level, and other exposed and to change a UI element to display one of those?

I know this is awkwardly put, but I'm sort of struggling to find a good way to explain what I want to do. I want the player to be able to display one of those ints in gameClass, but I want them to be able to choose. I'm trying to figure out if there is a good way to do this that also allows for me to readily modify gameClass and add new values.

You can always use reflection to get the properties of a class. You can even define an attribute ('DisplayableAttribute') and only get the properties that you've tagged as displayable, so you can have other, non-displayable properties.

Something like this may be what you're after. I haven't tested it so who knows.

code:
    public class DisplayableAttribute : Attribute
    {
    }

    public class MonsterThingy
    {
        [Displayable]
        public int HP { get; set; }
        [Displayable]
        public int MP { get; set; }
    }

    public class Foo
    {
        public Foo()
        {
            var monsterThingy = new MonsterThingy { HP = 100, MP = 100 };

            var displayableProperties = monsterThingy.GetType().GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(DisplayableAttribute)));
        }
    }

Adbot
ADBOT LOVES YOU

TheBlackVegetable
Oct 29, 2006

New Yorp New Yorp posted:

You can always use reflection to get the properties of a class. You can even define an attribute ('DisplayableAttribute') and only get the properties that you've tagged as displayable, so you can have other, non-displayable properties.

Something like this may be what you're after. I haven't tested it so who knows.

code:
    public class DisplayableAttribute : Attribute
    {
    }

    public class MonsterThingy
    {
        [Displayable]
        public int HP { get; set; }
        [Displayable]
        public int MP { get; set; }
    }

    public class Foo
    {
        public Foo()
        {
            var monsterThingy = new MonsterThingy { HP = 100, MP = 100 };

            var displayableProperties = monsterThingy.GetType().GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(DisplayableAttribute)));
        }
    }

Reflection is probably the way to go. An alternative might be to use xml or json serialization, and turn your object into a string (which, of course, uses reflection under the hood)

JerikTelorian
Jan 19, 2007



That seems like exactly what I want! I'll go do some reading up on reflection, thanks!

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

biznatchio posted:

Add this property to the PropertyGroup in your csproj:
code:
<ServerGarbageCollection>true</ServerGarbageCollection>

Thanks man, I couldn't find this anywhere ...

raminasi
Jan 25, 2005

a last drink with no ice
If you want to be able to add/remove/modify properties at runtime too, though, you should give up and just use a dictionary type. Or you could whole-hog Entity-Component-System it.

Furism
Feb 21, 2006

Live long and headbang
I'm looking for a CI solution to build and deploy ASP.NET Core apps on Linux. I'd like to be able to trigger a build, run the unit tests and deploy when I commit to a given branch. Pretty standard stuff I think except I'd like to host it on my own servers. What would be a good project to handle this? I own the web and DNS servers so I can setup hostnames and install the stuff I have to.

Note that some of the projects I want to set this up with aren't open source. I'm not against using online services if they are free but they must provide private repositories for the non-open source parts. Mostly because this is a side project of mine and I can't really spend more money on this than the price I pay for the VPS.

EssOEss
Oct 23, 2006
128-bit approved
I use Visual Studio Team Services and I love it. Easiest to use devops automation suite I have ever run into. The default build and release definition templates pretty much do exactly what you said. I think it has a free tier with up to 5 users? Not sure, we use the paid tier through MSDN.

Furism
Feb 21, 2006

Live long and headbang
Sounds good, but how do they publish the app after its built? Do you have to use Azure or can they just POST the artifacts somewhere?

edit: nevermind, I see their publish options now that I actually tried it.

Furism fucked around with this message at 20:48 on Jul 5, 2017

Drastic Actions
Apr 7, 2009

FUCK YOU!
GET PUMPED!
Nap Ghost
I think you can also have a app service that’s on Azure be auto-provisioned to have continuous deployment through a wizard that will set up a VSTS job for you. Got that working with one of our internal sites and it worked well.

EssOEss
Oct 23, 2006
128-bit approved
Yeah and in the end, the whole build & release workflow is just a set of steps to execute one after another. You can put any steps in there if you want - run your own exes, run them on Linux or Windows, publish to whereever you want. The default templates are just easy examples but it's fully customizable.

For example, I push Docker images to an image registry in my build definition, then the release definition shoots out instructions to install them on various servers. Alternatively, you can install an agent on your server, which will then make it so that the VSTS release definition actually gets executed directly on your own server, pulling in any build outputs automatically.

Mr Shiny Pants
Nov 12, 2012
Nevermind.....

Always check if you are iterating over the right list.....

Mr Shiny Pants fucked around with this message at 21:13 on Jul 6, 2017

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION
I'm looking at introducing some more automated tests, and I'd like something where I can fire up a deployment of a project, point a tool of some description at it, and have that tool run over the entire project, clicking every clickable thing etc. The main caveat is that a lot of the "clickable things" are not necessarily <a> or <button> and a lot of it is client-side, single-page style navigation, so I'm not sure if there's a tool that will be able to follow these things correctly. That said, 95% of them ARE <a> or <button> so it's not a huge problem if it can't follow clicks on other elements.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

a hot gujju bhabhi posted:

I'm looking at introducing some more automated tests, and I'd like something where I can fire up a deployment of a project, point a tool of some description at it, and have that tool run over the entire project, clicking every clickable thing etc. The main caveat is that a lot of the "clickable things" are not necessarily <a> or <button> and a lot of it is client-side, single-page style navigation, so I'm not sure if there's a tool that will be able to follow these things correctly. That said, 95% of them ARE <a> or <button> so it's not a huge problem if it can't follow clicks on other elements.

Selenium, but seriously only use it for smoke tests. Unit and integration test first and foremost. UI tests are slow and brittle and suck to maintain. I've been down that road before with clients that refused to listen to reason and it never ended well.

I cannot imagine what the value of "clicking every clickable thing" is. You clicked the thing. Did it behave properly? Who knows. Write tests tailored to actual use-cases.

New Yorp New Yorp fucked around with this message at 00:58 on Jul 7, 2017

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

New Yorp New Yorp posted:

Selenium, but seriously only use it for smoke tests. Unit and integration test first and foremost. UI tests are slow and brittle and suck to maintain. I've been down that road before with clients that refused to listen to reason and it never ended well.

I cannot imagine what the value of "clicking every clickable thing" is. You clicked the thing. Did it behave properly? Who knows. Write tests tailored to actual use-cases.

"clicking every clickable thing" was really not the best way to describe it. Basically I'm trying to automate the process of hitting every controller action needed by the MVC project, as I suspect there are some that are no longer in use, and some that are but could maybe be refactored, and that refactoring itself might break some links as well.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

a hot gujju bhabhi posted:

"clicking every clickable thing" was really not the best way to describe it. Basically I'm trying to automate the process of hitting every controller action needed by the MVC project, as I suspect there are some that are no longer in use, and some that are but could maybe be refactored, and that refactoring itself might break some links as well.

This is a classic example of an XY problem.

Your actual problem is that you want to find dead code -- in this case, unused controller actions. A good solution to that problem is to instrument your application so you can monitor what's being hit and what isn't. A less good solution is to try to figure this out by clicking around the UI.

Look at Application Insights or Dynatrace or something. As far as I'm concerned, any non-trivial application should be instrumented to at least some degree.

New Yorp New Yorp fucked around with this message at 04:23 on Jul 7, 2017

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



I think you'd need to go over request logs to make sure your endpoints aren't being hit - unless you don't care if someone bookmarked one that you 'hid' by removing it from a view.

Xeom
Mar 16, 2007
New to this guys and I'm having an issue. I'm just trying to go through an array of strings in order to check if the word in the string is also in "enable1.txt".
Every time a word does match, it should up score by one. However, as far as I can tell it is only processing the first element of "input" even when other words are in "enable1.txt".

What am I doing wrong?

code:
    public static int compareText(string[] input) {
        StreamReader reader = new StreamReader("enable1.txt");
        int score = 0;
        foreach (string x in input)
            while (reader.EndOfStream == false)
                if (reader.ReadLine() == x) {
                    score += 1;
                    //Console.WriteLine(x); // for debugging
                }
        reader.Close();
        return score;
    }

B-Nasty
May 25, 2005

So, you have essentially 2 collections of strings: the ones to check for and all the lines in the file. Doing something similar to how you wrote it, I would:

code:
        public static int CompareText(string[] input)
        {
            int score = 0;
            foreach (string fileLine in File.ReadLines("enable1.txt"))
           {
                foreach (string inputToCheck in input)
                {
                    if (fileLine == inputToCheck)
                        score++;
                }
	    }
            return score;
        }
What I assume, however, is that the input strings are all unique (no duplicates) which would allow you to do it in one line:

return File.ReadLines("enable1.txt").Count(x => input.Contains(x));

Sedro
Dec 31, 2008

a hot gujju bhabhi posted:

"clicking every clickable thing" was really not the best way to describe it. Basically I'm trying to automate the process of hitting every controller action needed by the MVC project, as I suspect there are some that are no longer in use, and some that are but could maybe be refactored, and that refactoring itself might break some links as well.

Sounds like you need code coverage and/or static analysis tools.

Xeom
Mar 16, 2007

B-Nasty posted:

So, you have essentially 2 collections of strings: the ones to check for and all the lines in the file. Doing something similar to how you wrote it, I would:

code:
      CODE
What I assume, however, is that the input strings are all unique (no duplicates) which would allow you to do it in one line:

return File.ReadLines("enable1.txt").Count(x => input.Contains(x));

Thanks B-Nasty. I'm literally at the point where I'm learning new things by the hour. I understand the for loop code fairly easily, but the single line of code is a bit vexing. I just read up on lambda functions and I want to make sure I'm understanding the code correctly.

The lambda expression is the really confusing part. It seems to say "look for x, but hey x itself is a search function". Does the lambda function just tell Contains() give me everything you can find and put it into a list?

Edit: removed some questions, tested and got answers.

Xeom fucked around with this message at 01:46 on Jul 9, 2017

B-Nasty
May 25, 2005

Xeom posted:

The lambda expression is the really confusing part. It seems to say "look for x, but hey x itself is a search function". Does the lambda function just tell Contains() give me everything you can find and put it into a list?


It's really kinda saying, for each x, do something and return something (in this case a boolean). So, the x could be named fileLine (it can be any name you want, but is usually a single letter), and it would read for all the lines in the file, where the input array contains that line, get the count. The Count(x => x...) syntax is just a shortcut for:

fileLines.Where(fileLine => input.Contains(fileLine)).Count();

The contains is tricky here, because it is doing a search within a search (like the nested loops in the original.)

LINQ can take a while to understand, but once it clicks, it really opens up a world of power and simplicity. The beauty of LINQ methods is that they are, at their core, really simple operations (https://github.com/dotnet/corefx/tree/master/src/System.Linq/src/System/Linq) on collections.

rarbatrol
Apr 17, 2011

Hurt//maim//kill.
It took me a long time to understand lambda expressions, but it kind of clicked for me when I likened them to a mathematical equation: Given some object X, I want to check if the input contains that X. Most of the applications of them within LINQ are against items in a collection.

Iverron
May 13, 2012

I always explained lambdas using the success / error callbacks of ajax calls to new .NET people at my last job. Not exactly 1:1 unless you're talking filter or map or something, but it seemed to get people over the :wtc: is "x =>" thing.

mystes
May 31, 2006

Xeom posted:

New to this guys and I'm having an issue. I'm just trying to go through an array of strings in order to check if the word in the string is also in "enable1.txt".
Every time a word does match, it should up score by one. However, as far as I can tell it is only processing the first element of "input" even when other words are in "enable1.txt".

What am I doing wrong?

code:
    public static int compareText(string[] input) {
        StreamReader reader = new StreamReader("enable1.txt");
        int score = 0;
        foreach (string x in input)
            while (reader.EndOfStream == false)
                if (reader.ReadLine() == x) {
                    score += 1;
                    //Console.WriteLine(x); // for debugging
                }
        reader.Close();
        return score;
    }
Since nobody actually explained why this doesn't work:

The while loop keeps advancing in the file until the end, and you don't do anything to reset the position to the beginning. This means that after the first time you go through the while loop, it will already be at the end. To make this code work, you would need to either open the file again in each iteration of the for loop (really terrible) or seek to the beginning each time (less terrible).

The first code that B-Nasty gave is more efficient and solves this issue by switching the order of the loops, so that the outer loop reads through the file and you only have to do this a single time.

quote:

The lambda expression is the really confusing part. It seems to say "look for x, but hey x itself is a search function". Does the lambda function just tell Contains() give me everything you can find and put it into a list?
Lambda expressions are just a way to define functions without giving them names. The actual lambda expressions shouldn't be confusing, although code that actually uses them may be confusing if you aren't familiar with this style.

x => input.Contains(x) is just like
code:
bool myfunction(x) {
return input.Contains(x)
}

mystes fucked around with this message at 03:46 on Jul 9, 2017

Iverron
May 13, 2012

Passing funcs as a parameter is a challenge for some. Even if they've technically seen it in AJAX calls, etc., many weren't really thinking about what was going on there.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

New Yorp New Yorp posted:

This is a classic example of an XY problem.

Your actual problem is that you want to find dead code -- in this case, unused controller actions. A good solution to that problem is to instrument your application so you can monitor what's being hit and what isn't. A less good solution is to try to figure this out by clicking around the UI.

Look at Application Insights or Dynatrace or something. As far as I'm concerned, any non-trivial application should be instrumented to at least some degree.


Sedro posted:

Sounds like you need code coverage and/or static analysis tools.

I know this and we're using dotCover for that part, but a code coverage tool is useless unless you actually have some way to exercise all the possible paths through your application. This second part is what I'm asking about. I could obviously open up the app and just click on everything I can find but that doesn't strike me as super reliable, and I was hoping there exists a tool to automate this part for me.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

a hot gujju bhabhi posted:

I know this and we're using dotCover for that part, but a code coverage tool is useless unless you actually have some way to exercise all the possible paths through your application. This second part is what I'm asking about. I could obviously open up the app and just click on everything I can find but that doesn't strike me as super reliable, and I was hoping there exists a tool to automate this part for me.

dotCover doesn't address my advice. Your code is exercised best in production, where people are using it, possibly in ways that you can't even imagine, including potentially via bookmarks to URLs that are no longer accessible via clicking.

I'm saying to add monitoring in production so that this is easily identifiable information based on actual production usage data.

https://azure.microsoft.com/en-us/services/application-insights/

Mr Shiny Pants
Nov 12, 2012
You must have a rough idea about which code seems to not be used anymore right? Otherwise you would not be doing this I guess.

Maybe keep it simple and log something to a textfile whenever the code is being hit? Keep it running for a week? A month? If it seems to not be used anymore start removing stuff.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

New Yorp New Yorp posted:

dotCover doesn't address my advice. Your code is exercised best in production, where people are using it, possibly in ways that you can't even imagine, including potentially via bookmarks to URLs that are no longer accessible via clicking.

I'm saying to add monitoring in production so that this is easily identifiable information based on actual production usage data.

https://azure.microsoft.com/en-us/services/application-insights/

The problem is our application is ridiculously configurable, so some code may never (or very rarely) be hit in production but are still technically reachable with the right configuration.

I know what Application Insights is and I understand what you're saying, but we're talking about two different things. Deploying that in production tells me nothing about code coverage with absolute certainty, it only tells me that none of our customers happened to hit a particular bit of code. I can't just go chopping out bits of code because they weren't hit in production, there's no guarantee that the code couldn't have been hit, only that it wasn't. I need some way to meticulously check every path through the application. But I'm guessing from the responses here that such a thing doesn't exist, so I guess it's going to have to be a manual task for us.

Mr Shiny Pants posted:

You must have a rough idea about which code seems to not be used anymore right? Otherwise you would not be doing this I guess.

Maybe keep it simple and log something to a textfile whenever the code is being hit? Keep it running for a week? A month? If it seems to not be used anymore start removing stuff.

I do have some top suspects, yeah. I might do something like this in combination with the Application Insights suggestion. I was just kind of hoping there was a more rigorous approach I could use (other than manually doing it).

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Let's say I want the ability to test my code for midnight/new-year's-eve shenanigans, so I replace every call to DateTime.Now with a call to a wrapper that returns Now in production, and returns (Now.AddTicks(someOffset)) when I test specific date times.

What would be the simplest way to ensure a direct call to DateTime.Now doesn't slip through code review?

Dirty Frank
Jul 8, 2004

We cover almost exactly that situation with Sonarqube, but it isn't simple to set up and its too slow on our project to be practical as a pre-checkin condition (it runs nightly and so raises issues after they've been checked-in). Also unless you assign CRs based on the issues it raises most devs will just ignore it (we don't and now have 80k issues in our super serious must fix list of issues), but at least it allows us to track usage accurately and easily. You can also get it to check for things like db loading methods being used in loops which is cool.

Mr Shiny Pants
Nov 12, 2012

NihilCredo posted:

Let's say I want the ability to test my code for midnight/new-year's-eve shenanigans, so I replace every call to DateTime.Now with a call to a wrapper that returns Now in production, and returns (Now.AddTicks(someOffset)) when I test specific date times.

What would be the simplest way to ensure a direct call to DateTime.Now doesn't slip through code review?

Don't know if this is possible or if it even runs on the full .Net, but could you compile a .Net framework version that overloads the DateTime.Now method and just returns what you want?

That way you don't need to keep track, just make sure you deploy this framework in the right place, otherwise bad stuff will happen. :)

It is opensource now right?

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Dirty Frank posted:

We cover almost exactly that situation with Sonarqube, but it isn't simple to set up and its too slow on our project to be practical as a pre-checkin condition (it runs nightly and so raises issues after they've been checked-in). Also unless you assign CRs based on the issues it raises most devs will just ignore it (we don't and now have 80k issues in our super serious must fix list of issues), but at least it allows us to track usage accurately and easily. You can also get it to check for things like db loading methods being used in loops which is cool.

I don't know about other solutions, but in VS Team Services, if you do a SonarQube analysis as part of a PR CI build, you'll get any new issues popping up as in-line annotations. Combine that with a branch policy that requires all annotations to be resolved before merging, and it forces people to deal with new issues. Or to intentionally, explicitly say "I don't care, I'm ignoring this", which the PR approver(s) can deal with as harshly as they'd like.

Dirty Frank
Jul 8, 2004

New Yorp New Yorp posted:

I don't know about other solutions, but in VS Team Services, if you do a SonarQube analysis as part of a PR CI build, you'll get any new issues popping up as in-line annotations. Combine that with a branch policy that requires all annotations to be resolved before merging, and it forces people to deal with new issues. Or to intentionally, explicitly say "I don't care, I'm ignoring this", which the PR approver(s) can deal with as harshly as they'd like.

I'm not on the CI team, but as I understand it it takes ~2 hours to run, so not really practical, maybe there's a way to only run it on the effected projects or something though?

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Dirty Frank posted:

I'm not on the CI team, but as I understand it it takes ~2 hours to run, so not really practical, maybe there's a way to only run it on the effected projects or something though?

Not that I'm aware of, but I'm far from an expert. It's probably just a case where the application is too big to be continuously integrated as a single unit and needs to be made a bit more modular. Of course, that's frequently easier said than done.

Dromio
Oct 16, 2002
Sleeper

NihilCredo posted:

Let's say I want the ability to test my code for midnight/new-year's-eve shenanigans, so I replace every call to DateTime.Now with a call to a wrapper that returns Now in production, and returns (Now.AddTicks(someOffset)) when I test specific date times.

What would be the simplest way to ensure a direct call to DateTime.Now doesn't slip through code review?

What about a custom Roslyn code analyzer that will fail the build when DateTime.Now is used?

Sedro
Dec 31, 2008
My project depends on a nuget package which is built from a project in a different solution. I want to develop some changes to the dependency. How am I supposed to deal with this? Can I switch it into a project reference temporarily somehow?

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

a hot gujju bhabhi posted:

The problem is our application is ridiculously configurable, so some code may never (or very rarely) be hit in production but are still technically reachable with the right configuration.

I know your pain. Where I used to work we had over 1000 configurable values. The configuration values were just thrown into a dynamic table in the UI, which made it way too easy to add five new ones in every drat project since there was virtually no design work involved. I and another developer had many debates with the domain experts where we argued that the configuration creep was one of the major reasons we had so many bugs. From a mathematical point of view, adding a configuration value makes your system at least twice as complex, because every configurable value can be in at least two different states (sometimes far more), and technically every configuration value can alter the behavior of the system when interacting with any one of the other configuration values. If k is the number of unique configurable values, the number of possible configuration states is at least 2k. In practice most of them are independent of each other, but you can never know for sure when some weird combination you hadn't thought of will behave oddly.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Sedro posted:

My project depends on a nuget package which is built from a project in a different solution. I want to develop some changes to the dependency. How am I supposed to deal with this? Can I switch it into a project reference temporarily somehow?

This is one of the major NuGet pain points. You could do something with MSBuild conditionals in the csproj file, I think. I dimly remember having done something like that once but I could be misremembering.

Adbot
ADBOT LOVES YOU

B-Nasty
May 25, 2005

Sedro posted:

My project depends on a nuget package which is built from a project in a different solution. I want to develop some changes to the dependency. How am I supposed to deal with this? Can I switch it into a project reference temporarily somehow?

I don't know if you're using TeamCity, but it makes building/hosting Nuget packages easy. Make some changes to package, commit + build, and go to dependent project's Nuget management to update to the version+1 or whatever directly from TeamCity's feed.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply