Search found 43 matches

by akincer
Tue Dec 14, 2021 10:58 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Re: Getting source code in Main

I was not trying to imply you do anything wrong :D I just know folks are going to find this post down the road and wonder. So the module thing had to be said. That's all, no offense. No offense taken. It could be the case that one reason I'm trying to solve it this way is because I don't know every...
by akincer
Tue Dec 14, 2021 10:44 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Re: Getting source code in Main

I am not sure why you do classes this way, that's for you to decide. But I do have to point out that the prescribed way to share code amongst otherwise unrelated items is to make them into a module. I have reasons for doing what I'm doing. As you might expect there are quite a bit of requirements, ...
by akincer
Tue Dec 14, 2021 10:25 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Re: Getting source code in Main

Here is a quick demo of how to use a Here-String to compile a class and use it. Thanks. I found Here-Strings not really desirable since you lose all IDE capabilities for that code block in Powershell Studio. The classes I'm building are not small in the least so using them isn't really a workable s...
by akincer
Tue Dec 14, 2021 10:10 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Re: Getting source code in Main

OK I've now figured out how to do this but it does come with one trade-off that I haven't found a workaround for but given that jobs will be very important I can live with it -- in Main.ps1 you lose type hinting for everything related to your class in Powershell Studio due to the way the object is i...
by akincer
Mon Dec 13, 2021 9:13 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Re: Getting source code in Main

I think I see what you're saying. I'll experiment a bit.
by akincer
Mon Dec 13, 2021 8:02 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Re: Getting source code in Main

I'm not certain I understand you completely. I understand how to use script blocks. That's not the issue. The issue is how I can both have an object class file set to include and share but also grab the source to inject into a Scriptblock like this. file Hello.ps1 -------- class Hello { } -------- f...
by akincer
Sat Dec 11, 2021 9:00 am
Forum: PowerShell
Topic: Getting source code in Main
Replies: 12
Views: 3621

Getting source code in Main

Product, version and build: Powershell Studio 2021 build 5.8.196 Operating system: n/a PowerShell version(s): n/a I feel like there might be a better way to do this but I think I've found a way. I'm trying to capture the source of class files I'm building so I can inject class code into script block...
by akincer
Fri Dec 03, 2021 12:43 pm
Forum: PowerShell Studio
Topic: Working with remotes using git for source control
Replies: 4
Views: 3208

Re: Working with remotes using git for source control

No the information on that page doesn't work as expected at all. I'm sure it's due to company provided security tools. Relying on such mechanisms probably works for most folks. It does not with the security tools and settings we're using which are quite rigorous.
by akincer
Fri Dec 03, 2021 8:43 am
Forum: PowerShell Studio
Topic: Working with remotes using git for source control
Replies: 4
Views: 3208

Re: Working with remotes using git for source control

Manually inputting the credentials to the target server via IP, username and password did not work. I will say that company provided security software and settings might be interfering but it's difficult to know. Is there anything special needed to format the credentials? The git server is just a st...
by akincer
Thu Dec 02, 2021 9:55 am
Forum: PowerShell Studio
Topic: Working with remotes using git for source control
Replies: 4
Views: 3208

Working with remotes using git for source control

Product, version and build: Powershell Studio 2021 build 5.8.196 Operating system: Windows 10 PowerShell version(s): N/A I'm trying to use git for source control with a remote and push/pull in the Source Control menu gives an authentication error while the git GUI and shell ask for a password and ar...